summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Jacke <bj@sernet.de>2013-07-03 18:51:14 +0200
committerSimo Sorce <idra@samba.org>2013-07-05 08:54:53 -0400
commite3c2dd13d4519d89fc78fd36a9ee4552f0f241ac (patch)
treeded9a43b8b28a7f99c7e0a5e3754ad4079adae6d
parent2bdaf532cde6e5529cf7d0136b149eb82f7ef601 (diff)
downloadsamba-e3c2dd13d4519d89fc78fd36a9ee4552f0f241ac.tar.gz
samba-e3c2dd13d4519d89fc78fd36a9ee4552f0f241ac.tar.bz2
samba-e3c2dd13d4519d89fc78fd36a9ee4552f0f241ac.zip
time: don't try to use the coarse clock
as we prefer to use the suspend aware CLOCK_BOOTTIME as monotonic clock source we cannot deal with the mono coarse clock any more. Actually I never saw a real performance gain with it. Signed-off-by: Björn Jacke <bj@sernet.de> Reviewed-by: Simo Sorce <idra@samba.org>
-rw-r--r--lib/util/time.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/util/time.c b/lib/util/time.c
index 56b2ec50de..bc87120859 100644
--- a/lib/util/time.c
+++ b/lib/util/time.c
@@ -69,19 +69,12 @@ _PUBLIC_ void clock_gettime_mono(struct timespec *tp)
/**
a wrapper to preferably get the monotonic time in seconds
-as this is only second resolution we can use the cached
-(and much faster) COARSE clock variant
**/
_PUBLIC_ time_t time_mono(time_t *t)
{
struct timespec tp;
- int rc = -1;
-#ifdef CLOCK_MONOTONIC_COARSE
- rc = clock_gettime(CLOCK_MONOTONIC_COARSE,&tp);
-#endif
- if (rc != 0) {
- clock_gettime_mono(&tp);
- }
+
+ clock_gettime_mono(&tp);
if (t != NULL) {
*t = tp.tv_sec;
}