Skip to content

Commit

Permalink
Use delta_as_nanos to avoid conversion through Duration
Browse files Browse the repository at this point in the history
  • Loading branch information
antifuchs committed May 28, 2023
1 parent 3c2dc99 commit feac43d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion governor/src/clock/quanta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ impl Clock for QuantaClock {

fn now(&self) -> Self::Instant {
let nowish = self.clock.raw();
QuantaInstant(Nanos::from(self.clock.delta(0, nowish)))
QuantaInstant(Nanos::new(self.clock.delta_as_nanos(0, nowish)))
}
}

Expand Down

0 comments on commit feac43d

Please sign in to comment.