mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Improve time/sleep accuracy on Windows
It's now almost as good as Linux thanks to a Windows 8+ API.
This commit is contained in:
parent
72ac5f18d9
commit
8caf1b48a9
9 changed files with 76 additions and 31 deletions
|
@ -59,7 +59,7 @@ uint32_t SleepEx(uint32_t dwMilliseconds, bool32 bAlertable);
|
|||
void GetSystemTime(struct NtSystemTime *lpSystemTime);
|
||||
bool32 SystemTimeToFileTime(const struct NtSystemTime *lpSystemTime,
|
||||
struct NtFileTime *lpFileTime);
|
||||
void GetSystemTimeAsFileTime(struct NtFileTime *); /* win8+ */
|
||||
void GetSystemTimeAsFileTime(struct NtFileTime *);
|
||||
void GetSystemTimePreciseAsFileTime(struct NtFileTime *); /* win8+ */
|
||||
|
||||
uint32_t WaitForSingleObject(int64_t hHandle, uint32_t dwMilliseconds);
|
||||
|
@ -110,8 +110,8 @@ void TryAcquireSRWLockShared(intptr_t *);
|
|||
|
||||
uint64_t GetTickCount64(void);
|
||||
|
||||
bool32 QueryPerformanceFrequency(int64_t *lpFrequency);
|
||||
bool32 QueryPerformanceCounter(int64_t *lpPerformanceCount);
|
||||
bool32 QueryPerformanceFrequency(uint64_t *lpFrequency);
|
||||
bool32 QueryPerformanceCounter(uint64_t *lpPerformanceCount);
|
||||
bool32 GetSystemTimeAdjustment(uint32_t *lpTimeAdjustment,
|
||||
uint32_t *lpTimeIncrement,
|
||||
bool32 *lpTimeAdjustmentDisabled);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue