mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-27 22:22:55 +00:00
feat: stub QueryPerformance{Counter, Frequency}
This commit is contained in:
parent
42035b71d8
commit
7c578c2161
|
|
@ -520,4 +520,21 @@ static inline BOOL FindClose(HANDLE hFindFile)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL QueryPerformanceFrequency(LARGE_INTEGER *lpFrequency)
|
||||
{
|
||||
// nanoseconds
|
||||
lpFrequency->QuadPart = (1000000000);
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline BOOL QueryPerformanceCounter(LARGE_INTEGER *lpPerformanceCount)
|
||||
{
|
||||
struct timespec ts;
|
||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
|
||||
lpPerformanceCount->QuadPart = (ts.tv_sec * 1000000000LL) + ts.tv_nsec;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // LINUXSTUBS_H
|
||||
Loading…
Reference in a new issue