Change sleep time from 1000ms to 500ms

This commit is contained in:
Sik Yoon 2023-07-22 20:25:30 +09:00
parent 500026212f
commit ce61f28e40

View File

@ -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;
}
}
});