X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fgethrxtime.h;h=10df67129ebcecc07d3a68a99425d08741fb93da;hb=5556cec1e3f87122e1b0e7bf82f1f75c57219a21;hp=c25b801f37b4d302b4d2fdc2bb059047d1d93d79;hpb=8d8eda4eab3d2801251daf4eb31756c3595e2fc6;p=gnulib.git diff --git a/lib/gethrxtime.h b/lib/gethrxtime.h index c25b801f3..10df67129 100644 --- a/lib/gethrxtime.h +++ b/lib/gethrxtime.h @@ -1,6 +1,6 @@ /* gethrxtime -- get high resolution real time - Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2005, 2009-2013 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 @@ -18,20 +18,35 @@ /* Written by Paul Eggert. */ #ifndef GETHRXTIME_H_ -# define GETHRXTIME_H_ 1 +#define GETHRXTIME_H_ 1 -# include "xtime.h" +#include "xtime.h" + +_GL_INLINE_HEADER_BEGIN +#ifndef GETHRXTIME_INLINE +# define GETHRXTIME_INLINE _GL_INLINE +#endif + +#ifdef __cplusplus +extern "C" { +#endif /* Get the current time, as a count of the number of nanoseconds since 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 -static inline xtime_t gethrxtime (void) { return gethrtime (); } +#if HAVE_ARITHMETIC_HRTIME_T && HAVE_DECL_GETHRTIME +# include +GETHRXTIME_INLINE xtime_t gethrxtime (void) { return gethrtime (); } # else xtime_t gethrxtime (void); -# endif +#endif + +_GL_INLINE_HEADER_END + +#ifdef __cplusplus +} +#endif #endif