The Pedigree Project  0.1
Public Member Functions | Private Attributes | List of all members
Time::Stopwatch Class Reference

#include <Stopwatch.h>

+ Collaboration diagram for Time::Stopwatch:

Public Member Functions

 Stopwatch (bool startRunning=false)
 
void start ()
 Start the stopwatch if it is not already started.
 
void stop ()
 Stop the stopwatch if it is not already stopped.
 
void reset ()
 Reset the stopwatch to zero.
 
Timestamp value ()
 Read the stopwatch value in nanoseconds.
 

Private Attributes

Timestamp m_Value
 Current value.
 
Timestamp m_StartValue
 Start time.
 
bool m_bRunning
 Running or not.
 

Detailed Description

Stopwatch provides a timer that can be stopped, started, and reset.

The value only ticks while the timer is running (it does not tick up during stop). The value is only current while the stopwatch is stopped.

Definition at line 33 of file Stopwatch.h.


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