mirror of
https://github.com/samba-team/samba.git
synced 2025-06-23 11:17:06 +03:00
s4/ldb: fix standalone build
This commit is contained in:
parent
5568ceda47
commit
d45f901b93
@ -45,12 +45,16 @@ static struct ldb_cmdline *options;
|
|||||||
|
|
||||||
static void _start_timer(void)
|
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)
|
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) +
|
return((tp2.tv_sec - tp1.tv_sec) +
|
||||||
(tp2.tv_nsec - tp1.tv_nsec)*1.0e-9);
|
(tp2.tv_nsec - tp1.tv_nsec)*1.0e-9);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user