summaryrefslogtreecommitdiff
path: root/source3/include/smbprofile.h
diff options
context:
space:
mode:
Diffstat (limited to 'source3/include/smbprofile.h')
-rw-r--r--source3/include/smbprofile.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h
index 60764794fc..5015d2a9e4 100644
--- a/source3/include/smbprofile.h
+++ b/source3/include/smbprofile.h
@@ -894,18 +894,13 @@ extern bool do_profile_times;
#define DEC_PROFILE_COUNT(x) profile_p->x--
#define ADD_PROFILE_COUNT(x,y) profile_p->x += (y)
-extern clockid_t __profile_clock;
-
static inline uint64_t profile_timestamp(void)
{
struct timespec ts;
- /* FIXME: On a single-CPU system, or a system where we have bound
- * daemon threads to single CPUs (eg. using cpusets or processor
- * affinity), it might be preferable to use CLOCK_PROCESS_CPUTIME_ID.
- */
-
- clock_gettime(__profile_clock, &ts);
+ /* we might prefer to use the _COARSE clock variant of CLOCK_MONOTONIC
+ that one is faster but cached and "just" tick-wise precise */
+ clock_gettime_mono(&ts);
return (ts.tv_sec * 1000000) + (ts.tv_nsec / 1000); /* usec */
}