#include <fine_clock.h>
Public Types | |
typedef timespec | WallTime |
Static Public Member Functions | |
static uint64_t | diffInNanos (WallTime end, WallTime start) |
static WallTime | now () |
This is a nano-second precision clock. We're skipping the harware TSC in favor of clock_gettime() which in some systems does not involve a trip to the OS (VDSO).
We're exporting a type WallTime that is and should remain opaque. The business of getting accurate time is still ongoing and we may change the internal representation of this class. (http://lwn.net/Articles/388188/)
Really, you shouldn't be using this class in hot code paths for platforms you're not sure whether the overhead is low.
Definition at line 39 of file fine_clock.h.
typedef timespec mongo::FineClock::WallTime |
Definition at line 42 of file fine_clock.h.
Definition at line 50 of file fine_clock.h.
static WallTime mongo::FineClock::now | ( | ) | [inline, static] |
Definition at line 44 of file fine_clock.h.