File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -104,13 +104,13 @@ async fn download(
104104 let progress_speed_clone = Arc :: clone ( & progress_speed) ;
105105 let accumulated_progress_clone = Arc :: clone ( & accumulated_progress) ;
106106
107- // Spawn a thread that runs on timely manner to update relative progress
107+ // Spawn a thread that runs on timely manner to update progress speed
108108 let _progress_thread = thread:: spawn ( move || {
109109 loop {
110110 {
111111 let mut progress_speed = progress_speed_clone. lock ( ) . unwrap ( ) ;
112112 let mut accumulated_progress = accumulated_progress_clone. lock ( ) . unwrap ( ) ;
113- * progress_speed = * accumulated_progress;
113+ * progress_speed = * accumulated_progress; // Set the speed to the accumulated progress
114114 * accumulated_progress = 0 ; // Reset the accumulated progress every second
115115 }
116116 thread:: sleep ( Duration :: from_secs ( 1 ) ) ;
You can’t perform that action at this time.
0 commit comments