mirror of
https://github.com/abakh/nbsdgames.git
synced 2024-12-04 14:46:22 -05:00
oops some typos in usleep()
This commit is contained in:
parent
5b46b348c1
commit
e600887248
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user