diff --git a/kernel/src/thor_acpi.cpp b/kernel/src/thor_acpi.cpp index 7ab07bab..308a8dfe 100644 --- a/kernel/src/thor_acpi.cpp +++ b/kernel/src/thor_acpi.cpp @@ -166,11 +166,11 @@ void AcpiOsSleep(UINT64 ms){ * \brief Active sleep for the given number of microseconds */ void AcpiOsStall(UINT32 us){ - auto ticks = timer::ticks(); - auto wait = us * (timer::timer_frequency() / 1000000); + uint64_t c = timer::counter(); + uint64_t wait = us * (timer::counter_frequency() / double(1000000)); wait = !wait ? 1 : wait; - while(timer::ticks() != ticks + wait){ + while(timer::counter() != c + wait){ asm volatile("nop"); asm volatile("nop"); asm volatile("nop");