Change sleep time from 1000ms to 500ms
This commit is contained in:
parent
500026212f
commit
ce61f28e40
|
|
@ -831,8 +831,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
}
|
||||
// sleep as much as the loop recurs per 1 seconds if all operation finished within 1 seconds.
|
||||
elapsed_time = instant.elapsed().as_millis();
|
||||
if 1_000 > elapsed_time {
|
||||
sleep(Duration::from_millis((1_000 - elapsed_time) as u64)).await;
|
||||
if 500 > elapsed_time {
|
||||
sleep(Duration::from_millis((500 - elapsed_time) as u64)).await;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user