[kernel] Fix clock::spinwait

spinwait wasn't scaling the target to microseconds
This commit is contained in:
Justin C. Miller
2021-01-18 18:19:18 -08:00
parent 3e372faf5e
commit 02766d82eb

View File

@@ -16,7 +16,7 @@ clock::clock(uint64_t rate, clock::source source_func, void *data) :
void void
clock::spinwait(uint64_t us) const clock::spinwait(uint64_t us) const
{ {
uint64_t when = m_source(m_data) + us; uint64_t when = value() + us;
while (value() < when); while (value() < when);
} }