ticktimer: use millis instead of nanos on hosted

The `elapsed_ms()` function should probably return milliseconds rather
than nanoseconds. Time marches on.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2020-10-30 10:29:12 +08:00
parent c7164c461d
commit 2d4a2bf871

View file

@ -70,12 +70,8 @@ mod implementation {
self.start = std::time::Instant::now();
}
pub fn raw_ticktime(&self) -> u64 {
self.start.elapsed().as_micros().try_into().unwrap()
}
pub fn elapsed_ms(&self) -> u64 {
self.start.elapsed().as_nanos().try_into().unwrap()
self.start.elapsed().as_millis().try_into().unwrap()
}
}
}