blob: 0c2ebcb897e0e2fb818d27d966d22f95b4b860b1 [file] [log] [blame]
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <errno.h>
int main(int argc, char *argv[])
{
struct timespec ts;
char *p;
if (argc != 2)
goto err;
p = strtotimespec(argv[1], &ts);
if ( *p )
goto err;
while ( nanosleep(&ts, &ts) == -1 && errno == EINTR )
;
return 0;
err:
fprintf(stderr, "Usage: %s seconds[.fraction]\n", argv[0]);
return 1;
}