diff --git a/sources/fisher.c b/sources/fisher.c index 795c30b..68e4c96 100644 --- a/sources/fisher.c +++ b/sources/fisher.c @@ -17,11 +17,11 @@ #ifdef Plan9 int usleep(long usec) { - int seconds = usec/1000000; - long nano = usec*1000 - seconds*1000000; + int second = usec/1000000; + long nano = usec*1000 - second*1000000; struct timespec sleepy = {0}; - sleepy.ts_sec = second; - sleepy.ts_nsec = nano; + sleepy.tv_sec = second; + sleepy.tv_nsec = nano; nanosleep(&sleepy, (struct timespec *) NULL); return 0; } diff --git a/sources/miketron.c b/sources/miketron.c index fcd9146..099677b 100644 --- a/sources/miketron.c +++ b/sources/miketron.c @@ -29,11 +29,11 @@ compile with -lncurses #define len 10 #define wid 40 int usleep(long usec) { - int seconds = usec/1000000; - long nano = usec*1000 - seconds*1000000; + int second = usec/1000000; + long nano = usec*1000 - second*1000000; struct timespec sleepy = {0}; - sleepy.ts_sec = second; - sleepy.ts_nsec = nano; + sleepy.tv_sec = second; + sleepy.tv_nsec = nano; nanosleep(&sleepy, (struct timespec *) NULL); return 0; } diff --git a/sources/muncher.c b/sources/muncher.c index 2c2a35f..1a347ab 100644 --- a/sources/muncher.c +++ b/sources/muncher.c @@ -27,11 +27,11 @@ compile with -lncurses #define len 10 #define wid 40 int usleep(long usec) { - int seconds = usec/1000000; - long nano = usec*1000 - seconds*1000000; + int second = usec/1000000; + long nano = usec*1000 - second*1000000; struct timespec sleepy = {0}; - sleepy.ts_sec = second; - sleepy.ts_nsec = nano; + sleepy.tv_sec = second; + sleepy.tv_nsec = nano; nanosleep(&sleepy, (struct timespec *) NULL); return 0; }