diff options
author | Ulrich Drepper <drepper@redhat.com> | 1997-01-25 02:36:37 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1997-01-25 02:36:37 +0000 |
commit | 5b82669229ad4e39c6ba1467045a2d81d44b8ccc (patch) | |
tree | ae62374b844b2c46f3db610c621aed0312a7039e /sysdeps/unix/sysv/linux/usleep.c | |
parent | 9d187dd4ad11f857386881db032d7e71ad26f47c (diff) | |
download | glibc-5b82669229ad4e39c6ba1467045a2d81d44b8ccc.tar.gz glibc-5b82669229ad4e39c6ba1467045a2d81d44b8ccc.tar.xz glibc-5b82669229ad4e39c6ba1467045a2d81d44b8ccc.zip |
update from main archive 970124 cvs/libc-970125
Sat Jan 25 02:05:19 1997 Eirik Fuller <eirik@netcom.com> * sysdeps/unix/sysv/linux/alpha/ioperm.c: Rename T2_SPARSE_BASE and T2_DENSE_BASE to T2_SPARSE_MEM and T2_DENSE_MEM resp. Thu Jan 23 11:13:46 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/unix/sysv/linux/usleep.c: Normalize the time specification. Fri Jan 24 14:33:45 1997 Ulrich Drepper <drepper@cygnus.com> * sysdeps/generic/socketbits.h: Also make SOCK_* constants available as macros so that #ifdef works. * sysdeps/unix/sysv/linux/socketbits.h: Likewise. 1997-01-23 Paul Eggert <eggert@twinsun.com> * login/utmp_db.c, manual/time.texi, shlib-versions, sunrpc/rpc/svc.h, sunrpc/rpcsvc/sm_inter.x, sysdeps/generic/abort.c, sysdeps/libm-ieee754/e_sinhl.c, sysdeps/unix/sysv/linux/net/route.h, sysdeps/unix/sysv/linux/sparc/__sigtrampoline.S: Spell fixes.
Diffstat (limited to 'sysdeps/unix/sysv/linux/usleep.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/usleep.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sysdeps/unix/sysv/linux/usleep.c b/sysdeps/unix/sysv/linux/usleep.c index 9d36a90008..9265897053 100644 --- a/sysdeps/unix/sysv/linux/usleep.c +++ b/sysdeps/unix/sysv/linux/usleep.c @@ -1,5 +1,5 @@ /* Implementation of the BSD usleep function using nanosleep. - Copyright (C) 1996 Free Software Foundation, Inc. + Copyright (C) 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. @@ -24,8 +24,8 @@ void usleep (unsigned int useconds) { - struct timespec ts = { tv_sec: 0, - tv_nsec: (long int) useconds * 1000ul }; + struct timespec ts = { tv_sec: (long int) (useconds / 1000000), + tv_nsec: (long int) (useconds % 1000000) * 1000ul }; __nanosleep (&ts, NULL); } |