time
This commit is contained in:
@@ -27,12 +27,6 @@ fn void osBarrierWait(Barrier barrier) {
|
||||
}
|
||||
|
||||
// Time
|
||||
fn u64 osTimeMicrosecondsNow() {
|
||||
struct timespec ts;
|
||||
clock_gettime(CLOCK_MONOTONIC_RAW, &ts);
|
||||
return ((u64)ts.tv_sec * 1000000) + ((u64)ts.tv_nsec / 1000000);
|
||||
}
|
||||
|
||||
fn void osSleepMicroseconds(u32 t) {
|
||||
usleep(t);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user