mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
[kernel] Fix clock::spinwait
spinwait wasn't scaling the target to microseconds
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user