Skip to content

Commit

Permalink
Added the possibility of a small error
Browse files Browse the repository at this point in the history
  • Loading branch information
sashacmc committed Jan 24, 2024
1 parent f58aa2e commit 9084ce8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zenoh/tests/interceptors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ fn downsampling() {
let curr_time = std::time::Instant::now();
if sample.key_expr.as_str() == "test/downsamples/r100" {
let mut last_time = last_time_r100.lock().unwrap();
let interval = (curr_time - *last_time).as_millis();
let interval = (curr_time - *last_time).as_millis() + 1;
*last_time = curr_time;
println!("interval 100: {}", interval);
assert!(interval >= 100);
} else if sample.key_expr.as_str() == "test/downsamples/r50" {
let mut last_time = last_time_r50.lock().unwrap();
let interval = (curr_time - *last_time).as_millis();
let interval = (curr_time - *last_time).as_millis() + 1;
*last_time = curr_time;
println!("interval 50: {}", interval);
assert!(interval >= 50);
Expand Down

0 comments on commit 9084ce8

Please sign in to comment.