mongo::FineClock Class Reference

#include <fine_clock.h>

List of all members.

Public Types

typedef timespec WallTime

Static Public Member Functions

static uint64_t diffInNanos (WallTime end, WallTime start)
static WallTime now ()

Detailed Description

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.


Member Typedef Documentation

typedef timespec mongo::FineClock::WallTime

Definition at line 42 of file fine_clock.h.


Member Function Documentation

static uint64_t mongo::FineClock::diffInNanos ( WallTime  end,
WallTime  start 
) [inline, static]

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.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


mongodb
Author(s): Nate Koenig
autogenerated on Fri Jan 11 12:15:55 2013