Change timeout value
This commit is contained in:
parent
cd67e47872
commit
8f178e4812
1 changed files with 2 additions and 2 deletions
|
@ -6,7 +6,7 @@ use tokio::time::{sleep, Duration, Instant};
|
|||
#[tokio::main]
|
||||
async fn main() {
|
||||
let start = Instant::now();
|
||||
sleep(Duration::from_secs(1)).await;
|
||||
sleep(Duration::from_millis(100)).await;
|
||||
let time_elapsed = &start.elapsed().as_millis();
|
||||
assert!((1000..1100).contains(time_elapsed), "{}", time_elapsed);
|
||||
assert!((100..1000).contains(time_elapsed), "{}", time_elapsed);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue