@@ -15,7 +15,9 @@ use oma_console::{
1515use oma_fetch:: { Event , SingleDownloadError } ;
1616use reqwest:: StatusCode ;
1717
18- use crate :: { WRITER , error:: Chain , fl, install_progress:: osc94_progress, msg, utils:: is_root} ;
18+ use crate :: {
19+ LATENCY , WRITER , error:: Chain , fl, install_progress:: osc94_progress, msg, utils:: is_root,
20+ } ;
1921use crate :: { color_formatter, error:: OutputError } ;
2022use oma_refresh:: db:: Event as RefreshEvent ;
2123use oma_utils:: human_bytes:: HumanBytes ;
@@ -281,6 +283,12 @@ impl OmaMultiProgressBar {
281283 . insert ( index + 1 , ProgressBar :: new ( size) . with_style ( sty) ) ;
282284 let total_width = total_width ( total) ;
283285 pb. set_message ( format ! ( "({:>total_width$}/{total}) {msg}" , index + 1 ) ) ;
286+ pb. enable_steady_tick (
287+ LATENCY
288+ . get ( )
289+ . copied ( )
290+ . unwrap_or_else ( || Duration :: from_millis ( 100 ) ) ,
291+ ) ;
284292 self . pb_map . insert ( index + 1 , pb) ;
285293 }
286294 Event :: ProgressInc { index, size } => {
@@ -313,6 +321,12 @@ impl OmaMultiProgressBar {
313321 let pb = self
314322 . mb
315323 . insert ( 0 , ProgressBar :: new ( total_size) . with_style ( sty) ) ;
324+ pb. enable_steady_tick (
325+ LATENCY
326+ . get ( )
327+ . copied ( )
328+ . unwrap_or_else ( || Duration :: from_millis ( 100 ) ) ,
329+ ) ;
316330 self . pb_map . insert ( 0 , pb) ;
317331 }
318332 Event :: Failed { file_name, error } => {
0 commit comments