mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
uptime(2) now reports usecs instead of msecs.
This commit is contained in:
parent
597e700618
commit
854d9b171a
6 changed files with 16 additions and 16 deletions
|
|
@ -11,7 +11,7 @@ int main(int argc, char* argv[])
|
|||
|
||||
uintmax_t start;
|
||||
if ( uptime(&start) ) { perror("uptime"); return 1; }
|
||||
uintmax_t end = start + 1ULL * 1000ULL; // 1 second
|
||||
uintmax_t end = start + 1ULL * 1000ULL * 1000ULL; // 1 second
|
||||
size_t count = 0;
|
||||
uintmax_t now;
|
||||
while ( !uptime(&now) && now < end ) { usleep(0); count += 2; /* back and forth */ }
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ int main(int argc, char* argv[])
|
|||
{
|
||||
uintmax_t start;
|
||||
if ( uptime(&start) ) { perror("uptime"); return 1; }
|
||||
uintmax_t end = start + 1ULL * 1000ULL; // 1 second
|
||||
uintmax_t end = start + 1ULL * 1000ULL * 1000ULL; // 1 second
|
||||
size_t count = 0;
|
||||
uintmax_t now;
|
||||
while ( !uptime(&now) && now < end ) { count++; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue