ts_sec -> tv_sec

ts_nsec -> tv_nsec
This commit is contained in:
nate 1996-09-20 06:06:28 +00:00
parent 41b14ae59f
commit 934efd0502
2 changed files with 5 additions and 5 deletions

View File

@ -58,10 +58,10 @@ sleep(seconds)
struct timespec time_remaining;
if (seconds) {
time_to_sleep.ts_sec = seconds;
time_to_sleep.ts_nsec = 0;
time_to_sleep.tv_sec = seconds;
time_to_sleep.tv_nsec = 0;
nanosleep(&time_to_sleep,&time_remaining);
seconds = time_remaining.ts_sec;
seconds = time_remaining.tv_sec;
}
return(seconds);
#else

View File

@ -60,8 +60,8 @@ usleep(useconds)
struct timespec time_to_sleep;
if (useconds) {
time_to_sleep.ts_nsec = (useconds % 1000000) * 1000;
time_to_sleep.ts_sec = useconds / 1000000;
time_to_sleep.tv_nsec = (useconds % 1000000) * 1000;
time_to_sleep.tsvsec = useconds / 1000000;
nanosleep(&time_to_sleep,NULL);
}
#else