diff --git a/console-subscriber/src/stats.rs b/console-subscriber/src/stats.rs index c8b0a942b..1a281b031 100644 --- a/console-subscriber/src/stats.rs +++ b/console-subscriber/src/stats.rs @@ -518,17 +518,8 @@ impl PollStats { None => return, // Async operations record polls, but not wakes }; - let elapsed = match at.checked_duration_since(scheduled) { - Some(elapsed) => elapsed, - None => { - eprintln!( - "possible Instant clock skew detected: a poll's start timestamp \ - was before the wake time/last poll end timestamp\nwake = {:?}\n start = {:?}", - scheduled, at - ); - return; - } - }; + // `at < scheduled` is possible when a task switches threads between polls. + let elapsed = at.saturating_duration_since(scheduled); // if we have a scheduled time histogram, add the timestamp timestamps.scheduled_histogram.record_duration(elapsed);