diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2005-02-26 08:18:27 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2005-02-26 08:18:27 +0000 |
commit | 10ce26c08f4e8ffe6ac636b1fec6a33a847b0d3a (patch) | |
tree | a62cb33af6e62da2f4294efb9ac6882fdaaaaa11 /lib/timespec.h | |
parent | e8cddd652b70864dafe0698c310611f7a6a67e30 (diff) | |
download | gnulib-10ce26c08f4e8ffe6ac636b1fec6a33a847b0d3a.tar.gz |
* modules/gethrxtime: New file.
* modules/xnanosleep (Files): Add m4/xnanosleep.m4.
(Depends-on): Add gethrxtime.
(configure.ac): Add gl_XNANOSLEEP.
(Makefile.am): Remove lib_SOURCES line.
* lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
* lib/timespec.h (gettime): Return void, since it always
succeeds now. All uses changed.
* lib/gettime.c (gettime) Likewise.
[HAVE_NANOTIME]: Prefer nanotime.
Assume gettimeofday succeeds, as POSIX requires.
Assime time () succeeds, since other code already does.
* lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
(timespec_subtract): Remove.
(NANOSLEEP_BUG_WORKAROUND): New constant.
(xnanosleep): Use gethrxtime rather than gettime; this simplifies
things considerably. Use it only on GNU/Linux hosts, since the
workaround shouldn't be needed elsewhere.
* m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
* m4/gettime.m4 (gl_GETTIME): Check for nanotime.
Diffstat (limited to 'lib/timespec.h')
-rw-r--r-- | lib/timespec.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/timespec.h b/lib/timespec.h index 2c32a23db4..d751fc6ab1 100644 --- a/lib/timespec.h +++ b/lib/timespec.h @@ -1,6 +1,6 @@ /* timespec -- System time interface - Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc. + Copyright (C) 2000, 2002, 2004, 2005 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -65,7 +65,7 @@ struct timespec int nanosleep (); # endif -int gettime (struct timespec *); +void gettime (struct timespec *); int settime (struct timespec const *); #endif |