MercuryTimer Class Reference

General timer/clock. More...

#include <MercuryTimer.h>

List of all members.

Public Member Functions

 MercuryTimer ()
 ~MercuryTimer ()
double Peek ()
 Look at the current value, but don't change anything.
double Age ()
 Get Age (time since last touch).
void Touch ()
 Touch (reset) timer.
void Pause ()
 Pause timer (stop it's counting).
MercuryTimer operator- (const MercuryTimer &t)
MercuryTimer operator+ (const MercuryTimer &t)
void operator= (const MercuryTimer &t)

Private Member Functions

uint64_t GetTimeMicroseconds ()
int64_t FixupTimeIfLooped (int64_t usecs)
int64_t FixupTimeIfBackwards (int64_t usecs)

Private Attributes

long m_secs
long m_usecs
double m_pTime
bool m_paused

Detailed Description

General timer/clock.

Definition at line 10 of file MercuryTimer.h.

Constructor & Destructor Documentation

MercuryTimer::MercuryTimer (  ) 

Definition at line 13 of file MercuryTimer.cpp.

MercuryTimer::~MercuryTimer (  ) 

Definition at line 20 of file MercuryTimer.cpp.

Member Function Documentation

double MercuryTimer::Peek (  ) 

Look at the current value, but don't change anything.

Definition at line 24 of file MercuryTimer.cpp.

double MercuryTimer::Age (  ) 

Get Age (time since last touch).

Definition at line 29 of file MercuryTimer.cpp.

void MercuryTimer::Touch (  ) 

Touch (reset) timer.

Definition at line 41 of file MercuryTimer.cpp.

void MercuryTimer::Pause (  )  [inline]

Pause timer (stop it's counting).

Definition at line 22 of file MercuryTimer.h.

MercuryTimer MercuryTimer::operator- ( const MercuryTimer t  ) 

Definition at line 64 of file MercuryTimer.cpp.

MercuryTimer MercuryTimer::operator+ ( const MercuryTimer t  ) 

Definition at line 79 of file MercuryTimer.cpp.

void MercuryTimer::operator= ( const MercuryTimer t  ) 

Definition at line 94 of file MercuryTimer.cpp.

uint64_t MercuryTimer::GetTimeMicroseconds (  )  [private]

Definition at line 103 of file MercuryTimer.cpp.

int64_t MercuryTimer::FixupTimeIfLooped ( int64_t  usecs  )  [private]

Definition at line 116 of file MercuryTimer.cpp.

int64_t MercuryTimer::FixupTimeIfBackwards ( int64_t  usecs  )  [private]

Definition at line 133 of file MercuryTimer.cpp.

Member Data Documentation

long MercuryTimer::m_secs [private]

Definition at line 32 of file MercuryTimer.h.

long MercuryTimer::m_usecs [private]

Definition at line 33 of file MercuryTimer.h.

double MercuryTimer::m_pTime [private]

Definition at line 35 of file MercuryTimer.h.

bool MercuryTimer::m_paused [private]

Definition at line 36 of file MercuryTimer.h.

The documentation for this class was generated from the following files:
Hosted by Logo