[all] moved time and locking methods to the common library

This commit is contained in:
Geoffrey McRae
2020-01-17 14:35:08 +11:00
parent 278d851c7c
commit 4746c89227
13 changed files with 55 additions and 95 deletions

View File

@@ -116,11 +116,11 @@ bool lgWaitEvent(LGEvent * event, unsigned int timeout)
}
}
uint64_t now = getMicrotime();
uint64_t now = microtime();
uint64_t end = now + spinTime * 1000;
while(!event->signaled)
{
now = getMicrotime();
now = microtime();
if (now >= end)
break;
}
@@ -218,4 +218,4 @@ bool lgResetEvent(LGEvent * event)
{
event->signaled = false;
return ResetEvent(event->handle);
}
}