30 lines
423 B
C
30 lines
423 B
C
|
#include <u.h>
|
||
|
#include <libc.h>
|
||
|
|
||
|
int verbose = 0;
|
||
|
void
|
||
|
main(void)
|
||
|
{
|
||
|
int ret = 0; // success
|
||
|
uint64_t start, end;
|
||
|
char *msg;
|
||
|
|
||
|
start = nsec();
|
||
|
sleep(1);
|
||
|
end = nsec();
|
||
|
|
||
|
if (end <= start)
|
||
|
ret = 1;
|
||
|
|
||
|
if (verbose)
|
||
|
print("nsec: start %llx, end %llx\n", start, end);
|
||
|
if(ret){
|
||
|
msg = smprint("nsec: FAIL: start %llx end %llx",
|
||
|
start, end);
|
||
|
print("%s\n", msg);
|
||
|
exits(msg);
|
||
|
}
|
||
|
print("PASS\n");
|
||
|
exits("PASS");
|
||
|
}
|