Merge pull request #2130 from andresovela/time-mock-driver-fix

time: fix MockDriver::now()
This commit is contained in:
Dario Nieuwenhuis 2023-10-31 23:36:56 +00:00 committed by GitHub
commit 35bb20abe7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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> {