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
|
@ -50,7 +50,7 @@ TEST(clock_gettime, testClockRealtime) {
|
|||
EXPECT_LT((unsigned)ABS(ts.tv_sec - tv.tv_sec), 5u);
|
||||
}
|
||||
|
||||
BENCH(clock_gettime, bench) {
|
||||
TEST(clock_gettime, bench) {
|
||||
struct timeval tv;
|
||||
struct timespec ts;
|
||||
gettimeofday(&tv, 0); // trigger init
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue