24 #define MONGO_TIMER_IMPL_POSIX_MONOTONIC_CLOCK
28 #include "mongo/util/assert_util.h"
32 unsigned long long Timer::now()
const {
34 unsigned long long result;
36 fassert(16160, !clock_gettime(CLOCK_MONOTONIC, &the_time));
40 result =
static_cast<unsigned long long>(the_time.tv_sec);
41 result *= nanosPerSecond;
42 result +=
static_cast<unsigned long long>(the_time.tv_nsec);
Utility functions for parsing numbers from strings.
Definition: compare_numbers.h:20
MONGO_CLIENT_API void MONGO_CLIENT_FUNC fassert(int msgid, bool testOK)
aborts on condition failure
Definition: assert_util.h:210