mirror of
https://github.com/thunderbrewhq/common.git
synced 2025-12-12 03:02:29 +00:00
feat(time): add basic OsGetAsyncClocksPerSecond for Mac and Linux
This commit is contained in:
parent
90cff0ab83
commit
9a3b3aeafd
2 changed files with 10 additions and 1 deletions
|
|
@ -19,6 +19,10 @@ uint64_t OsGetAsyncTimeMsPrecise() {
|
||||||
return ticks;
|
return ticks;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int64_t OsGetAsyncClocksPerSecond() {
|
||||||
|
return 1000LL;
|
||||||
|
}
|
||||||
|
|
||||||
uint64_t OsGetAsyncTimeMs() {
|
uint64_t OsGetAsyncTimeMs() {
|
||||||
return OsGetAsyncTimeMsPrecise();
|
return OsGetAsyncTimeMsPrecise();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,11 @@ uint64_t OsGetAsyncTimeMs() {
|
||||||
return OsGetAsyncTimeMsPrecise();
|
return OsGetAsyncTimeMsPrecise();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int64_t OsGetAsyncClocksPerSecond() {
|
||||||
|
// TODO: verify
|
||||||
|
return 1000LL;
|
||||||
|
}
|
||||||
|
|
||||||
void OsSleep(uint32_t duration) {
|
void OsSleep(uint32_t duration) {
|
||||||
usleep(duration);
|
usleep(duration);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue