diff options
author | jasone <jasone@FreeBSD.org> | 2000-01-22 09:15:15 +0000 |
---|---|---|
committer | jasone <jasone@FreeBSD.org> | 2000-01-22 09:15:15 +0000 |
commit | 662c778dddfd1eedcfbf31144623538307e0ad6e (patch) | |
tree | 3fb4eb269ee16353d87ada75aac1eb3debe29b2d /lib | |
parent | 0c931ae0a1cede63ffc1b5fb439698d402d4c8a1 (diff) | |
download | FreeBSD-src-662c778dddfd1eedcfbf31144623538307e0ad6e.zip FreeBSD-src-662c778dddfd1eedcfbf31144623538307e0ad6e.tar.gz |
Fix millisecond to nanosecond conversion.
PR: misc/16245
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc_r/uthread/uthread_poll.c | 2 | ||||
-rw-r--r-- | lib/libkse/thread/thr_poll.c | 2 | ||||
-rw-r--r-- | lib/libpthread/thread/thr_poll.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc_r/uthread/uthread_poll.c b/lib/libc_r/uthread/uthread_poll.c index ce2b7af..fb6a266 100644 --- a/lib/libc_r/uthread/uthread_poll.c +++ b/lib/libc_r/uthread/uthread_poll.c @@ -61,7 +61,7 @@ _libc_poll(struct pollfd *fds, unsigned int nfds, int timeout) } else if (timeout > 0) { /* Convert the timeout in msec to a timespec: */ ts.tv_sec = timeout / 1000; - ts.tv_nsec = (timeout % 1000) * 1000; + ts.tv_nsec = (timeout % 1000) * 1000000; /* Set the wake up time: */ _thread_kern_set_timeout(&ts); diff --git a/lib/libkse/thread/thr_poll.c b/lib/libkse/thread/thr_poll.c index ce2b7af..fb6a266 100644 --- a/lib/libkse/thread/thr_poll.c +++ b/lib/libkse/thread/thr_poll.c @@ -61,7 +61,7 @@ _libc_poll(struct pollfd *fds, unsigned int nfds, int timeout) } else if (timeout > 0) { /* Convert the timeout in msec to a timespec: */ ts.tv_sec = timeout / 1000; - ts.tv_nsec = (timeout % 1000) * 1000; + ts.tv_nsec = (timeout % 1000) * 1000000; /* Set the wake up time: */ _thread_kern_set_timeout(&ts); diff --git a/lib/libpthread/thread/thr_poll.c b/lib/libpthread/thread/thr_poll.c index ce2b7af..fb6a266 100644 --- a/lib/libpthread/thread/thr_poll.c +++ b/lib/libpthread/thread/thr_poll.c @@ -61,7 +61,7 @@ _libc_poll(struct pollfd *fds, unsigned int nfds, int timeout) } else if (timeout > 0) { /* Convert the timeout in msec to a timespec: */ ts.tv_sec = timeout / 1000; - ts.tv_nsec = (timeout % 1000) * 1000; + ts.tv_nsec = (timeout % 1000) * 1000000; /* Set the wake up time: */ _thread_kern_set_timeout(&ts); |