mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-07 04:46:42 +00:00
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:
parent
c7164c461d
commit
2d4a2bf871
1 changed files with 1 additions and 5 deletions
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue