MOOCHO (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
StopWatchPack::stopwatch Class Reference

Simple stopwatch object. More...

#include <StopWatchPack_stopwatch.hpp>

Public Member Functions

 stopwatch ()
 Initializes of not running. More...
 
bool is_running () const
 Returns true if this is currently timming. More...
 
void start ()
 Starts timing if it has already not been started. More...
 
double stop ()
 Stops timing and returns the time (sec.) since start() was called. More...
 
void reset ()
 Stops and resets the clock if it is running. More...
 
double read ()
 Reads the elapsed time (sec.) and leaves the clock running. More...
 

Private Attributes

bool running_
 
double last_time_
 
double total_
 

Detailed Description

Simple stopwatch object.

Definition at line 59 of file StopWatchPack_stopwatch.hpp.

Constructor & Destructor Documentation

StopWatchPack::stopwatch::stopwatch ( )
inline

Initializes of not running.

Definition at line 63 of file StopWatchPack_stopwatch.hpp.

Member Function Documentation

bool StopWatchPack::stopwatch::is_running ( ) const
inline

Returns true if this is currently timming.

Definition at line 67 of file StopWatchPack_stopwatch.hpp.

void StopWatchPack::stopwatch::start ( )
inline

Starts timing if it has already not been started.

Definition at line 72 of file StopWatchPack_stopwatch.hpp.

double StopWatchPack::stopwatch::stop ( )
inline

Stops timing and returns the time (sec.) since start() was called.

Definition at line 80 of file StopWatchPack_stopwatch.hpp.

void StopWatchPack::stopwatch::reset ( )
inline

Stops and resets the clock if it is running.

Definition at line 90 of file StopWatchPack_stopwatch.hpp.

double StopWatchPack::stopwatch::read ( )
inline

Reads the elapsed time (sec.) and leaves the clock running.

Definition at line 97 of file StopWatchPack_stopwatch.hpp.

Member Data Documentation

bool StopWatchPack::stopwatch::running_
private

Definition at line 107 of file StopWatchPack_stopwatch.hpp.

double StopWatchPack::stopwatch::last_time_
private

Definition at line 108 of file StopWatchPack_stopwatch.hpp.

double StopWatchPack::stopwatch::total_
private

Definition at line 109 of file StopWatchPack_stopwatch.hpp.


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