feat(time): add basic OsGetAsyncClocksPerSecond for Mac and Linux

This commit is contained in:
phaneron 2025-04-11 23:35:20 -04:00
parent 90cff0ab83
commit 9a3b3aeafd
2 changed files with 10 additions and 1 deletions

View file

@ -19,6 +19,10 @@ uint64_t OsGetAsyncTimeMsPrecise() {
return ticks;
}
int64_t OsGetAsyncClocksPerSecond() {
return 1000LL;
}
uint64_t OsGetAsyncTimeMs() {
return OsGetAsyncTimeMsPrecise();
}
@ -27,4 +31,4 @@ void OsSleep(uint32_t duration) {
usleep(duration);
}
#endif
#endif

View file

@ -28,6 +28,11 @@ uint64_t OsGetAsyncTimeMs() {
return OsGetAsyncTimeMsPrecise();
}
int64_t OsGetAsyncClocksPerSecond() {
// TODO: verify
return 1000LL;
}
void OsSleep(uint32_t duration) {
usleep(duration);
}