Skip to content

Commit

Permalink
console_subscriber: remove clock skew warning in start_poll (#434)
Browse files Browse the repository at this point in the history
  • Loading branch information
h33p committed Jun 10, 2023
1 parent 5156e8e commit fb45ca1
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions console-subscriber/src/stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -518,17 +518,8 @@ impl<H: RecordDuration> PollStats<H> {
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);
Expand Down

0 comments on commit fb45ca1

Please sign in to comment.