From feac43dc21b54f60f7239bc00d8d38ebba14fcda Mon Sep 17 00:00:00 2001 From: Andreas Fuchs Date: Sun, 28 May 2023 17:57:52 -0400 Subject: [PATCH] Use delta_as_nanos to avoid conversion through Duration --- governor/src/clock/quanta.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/governor/src/clock/quanta.rs b/governor/src/clock/quanta.rs index 4d6eb5b2..4a0b571f 100644 --- a/governor/src/clock/quanta.rs +++ b/governor/src/clock/quanta.rs @@ -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))) } }