diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2002-01-10 00:38:40 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2002-01-10 00:38:40 +0000 |
commit | b80ea47ce71a5c6ecddd3a6937f0f1f7c01ba24e (patch) | |
tree | 136c9960f1e06612c20a9bacddd63360b48577f4 /lib/libpthread/uthread | |
parent | 4415d12cf360370d4f92c85f6e8cf8a57f7ed1e5 (diff) |
From FreeBSD: fix conversion from msec to timespec.
Diffstat (limited to 'lib/libpthread/uthread')
-rw-r--r-- | lib/libpthread/uthread/uthread_poll.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libpthread/uthread/uthread_poll.c b/lib/libpthread/uthread/uthread_poll.c index 6119eda2f34..cb6915fbd36 100644 --- a/lib/libpthread/uthread/uthread_poll.c +++ b/lib/libpthread/uthread/uthread_poll.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uthread_poll.c,v 1.6 2001/08/21 19:24:53 fgsch Exp $ */ +/* $OpenBSD: uthread_poll.c,v 1.7 2002/01/10 00:38:39 fgsch Exp $ */ /* * Copyright (c) 1999 Daniel Eischen <eischen@vigrid.com> * All rights reserved. @@ -63,12 +63,12 @@ poll(struct pollfd fds[], 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); } else if (timeout < 0) { - /* a timeout less than zero but not == -1 is invalid */ + /* a timeout less than zero but not == INFTIM is invalid */ errno = EINVAL; return (-1); } |