X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fgethrxtime.h;h=2247f968d33202ccfb69551b1e3dd5a09ce19d22;hb=7a97de48ca71de5fd6fac6d27f8d131d17e7fc9a;hp=4de3a9b3ef24ca31030d6261856ca70b88673e00;hpb=267a39bafd249d7eb9c37df06dc6defcf41cb343;p=gnulib.git diff --git a/lib/gethrxtime.h b/lib/gethrxtime.h index 4de3a9b3e..2247f968d 100644 --- a/lib/gethrxtime.h +++ b/lib/gethrxtime.h @@ -19,19 +19,20 @@ /* Written by Paul Eggert. */ #ifndef GETHRXTIME_H_ -#define GETHRXTIME_H_ 1 +# define GETHRXTIME_H_ 1 -#include "xtime.h" +# include "xtime.h" /* Get the current time, as a count of the number of nanoseconds since - an arbitrary epoch (e.g., the system boot time). This clock can't - be set, is always increasing, and is nearly linear. */ + an arbitrary epoch (e.g., the system boot time). Prefer a + high-resolution clock that is not subject to resetting or + drifting. */ -#if HAVE_ARITHMETIC_HRTIME_T && HAVE_DECL_GETHRTIME -# include +# if HAVE_ARITHMETIC_HRTIME_T && HAVE_DECL_GETHRTIME +# include static inline xtime_t gethrxtime (void) { return gethrtime (); } -#else +# else xtime_t gethrxtime (void); -#endif +# endif #endif