Merge pull request #2130 from andresovela/time-mock-driver-fix
time: fix MockDriver::now()
This commit is contained in:
commit
35bb20abe7
@ -51,7 +51,7 @@ impl MockDriver {
|
|||||||
|
|
||||||
impl Driver for MockDriver {
|
impl Driver for MockDriver {
|
||||||
fn now(&self) -> u64 {
|
fn now(&self) -> u64 {
|
||||||
critical_section::with(|cs| self.now.borrow(cs).get().as_micros() as u64)
|
critical_section::with(|cs| self.now.borrow(cs).get().as_ticks() as u64)
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe fn allocate_alarm(&self) -> Option<AlarmHandle> {
|
unsafe fn allocate_alarm(&self) -> Option<AlarmHandle> {
|
||||||
|
Loading…
Reference in New Issue
Block a user