diff options
author | Björn Jacke <bj@sernet.de> | 2010-09-01 11:22:09 +0200 |
---|---|---|
committer | Björn Jacke <bj@sernet.de> | 2010-09-01 11:23:50 +0200 |
commit | d45f901b9304977f7125fefcfc889076471442b4 (patch) | |
tree | efb1071be90f87cc8c8be6d7520d76c22ead9734 | |
parent | 5568ceda47905657b79f7971a3a5eca1ba0cedc1 (diff) | |
download | samba-d45f901b9304977f7125fefcfc889076471442b4.tar.gz samba-d45f901b9304977f7125fefcfc889076471442b4.tar.bz2 samba-d45f901b9304977f7125fefcfc889076471442b4.zip |
s4/ldb: fix standalone build
-rw-r--r-- | source4/lib/ldb/tools/ldbtest.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/lib/ldb/tools/ldbtest.c b/source4/lib/ldb/tools/ldbtest.c index a885b80c72..94dd2c696d 100644 --- a/source4/lib/ldb/tools/ldbtest.c +++ b/source4/lib/ldb/tools/ldbtest.c @@ -45,12 +45,16 @@ static struct ldb_cmdline *options; static void _start_timer(void) { - clock_gettime_mono(&tp1); + if (clock_gettime(CUSTOM_CLOCK_MONOTONIC, &tp1) != 0) { + clock_gettime(CLOCK_REALTIME, &tp1); + } } static double _end_timer(void) { - clock_gettime_mono(&tp2); + if (clock_gettime(CUSTOM_CLOCK_MONOTONIC, &tp2) != 0) { + clock_gettime(CLOCK_REALTIME, &tp2); + } return((tp2.tv_sec - tp1.tv_sec) + (tp2.tv_nsec - tp1.tv_nsec)*1.0e-9); } |