mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-12 14:09:12 +00:00
Fix issues with previous commit
This commit is contained in:
parent
2f48a02b44
commit
a0a404a431
8 changed files with 122 additions and 57 deletions
|
@ -19,6 +19,7 @@
|
|||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include "libc/assert.h"
|
||||
|
||||
#define MAXIMUM 1e9
|
||||
#define ITERATIONS 10
|
||||
|
@ -45,7 +46,7 @@ void TestSleepRelative(int clock) {
|
|||
if (clock_gettime(clock, &t1))
|
||||
return;
|
||||
for (int i = 0; i < ITERATIONS; ++i) {
|
||||
assert(!clock_nanosleep(clock, 0, &wf, 0));
|
||||
unassert(!clock_nanosleep(clock, 0, &wf, 0));
|
||||
}
|
||||
clock_gettime(clock, &t2);
|
||||
long took = timespec_tonanos(timespec_sub(t2, t1)) / ITERATIONS;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue