Public Member Functions | Static Public Member Functions | Private Attributes

LibGeoDecomp::ScopedTimer Class Reference

#include <scopedtimer.h>

Collaboration diagram for LibGeoDecomp::ScopedTimer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ScopedTimer (double *totalElapsedTime)
 ~ScopedTimer ()

Static Public Member Functions

static double time ()
 returns the time in secods, with microsecond accuracy.
static void busyWait (long microSeconds)
 sleeps for the given period.

Private Attributes

double * totalElapsedTime
double startTime

Constructor & Destructor Documentation

LibGeoDecomp::ScopedTimer::ScopedTimer ( double *  totalElapsedTime  )  [inline, explicit]
LibGeoDecomp::ScopedTimer::~ScopedTimer (  )  [inline]

References startTime, time(), and totalElapsedTime.


Member Function Documentation

static void LibGeoDecomp::ScopedTimer::busyWait ( long  microSeconds  )  [inline, static]

sleeps for the given period.

This is more accurate than usleep() and friends.

References time().

static double LibGeoDecomp::ScopedTimer::time (  )  [inline, static]

Member Data Documentation

Referenced by ~ScopedTimer().

Referenced by ~ScopedTimer().


The documentation for this class was generated from the following file: