diff options
author | Björn Jacke <bj@sernet.de> | 2010-08-26 12:22:02 +0200 |
---|---|---|
committer | Björn Jacke <bj@sernet.de> | 2010-08-31 10:24:37 +0200 |
commit | 63b1f2ee813b430e1f4bec3abb28a6266f8a82c8 (patch) | |
tree | 15e9d4d3099d974a8c25ef493ebedd21192123e4 /lib/replace/system | |
parent | 8c6ca6e25a4d33e4f9ae2ef13a3872cd533ba6f6 (diff) | |
download | samba-63b1f2ee813b430e1f4bec3abb28a6266f8a82c8.tar.gz samba-63b1f2ee813b430e1f4bec3abb28a6266f8a82c8.tar.bz2 samba-63b1f2ee813b430e1f4bec3abb28a6266f8a82c8.zip |
libreplace: make a define for a best effort monotonic clock
Diffstat (limited to 'lib/replace/system')
-rw-r--r-- | lib/replace/system/time.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/replace/system/time.h b/lib/replace/system/time.h index ff26531e45..3605d2692e 100644 --- a/lib/replace/system/time.h +++ b/lib/replace/system/time.h @@ -67,9 +67,16 @@ int rep_utimes(const char *filename, const struct timeval tv[2]); #endif #ifndef HAVE_CLOCK_GETTIME +/* CLOCK_REALTIME is required by POSIX */ #define CLOCK_REALTIME 0 typedef int clockid_t; int rep_clock_gettime(clockid_t clk_id, struct timespec *tp); #endif +/* make sure we have a best effort CUSTOM_CLOCK_MONOTONIC we can rely on */ +#ifndef CLOCK_MONOTONIC +#define CUSTOM_CLOCK_MONOTONIC CLOCK_REALTIME +#else +#define CUSTOM_CLOCK_MONOTONIC CLOCK_MONOTONIC +#endif #endif |