NvStopWatch Class Reference

Cross-platform wall-clock timer. More...

#include <NvStopWatch.h>

List of all members.

Public Member Functions

 NvStopWatch ()
 Constructor, default.
virtual ~NvStopWatch ()
 Destructor.
virtual void start ()=0
 Starts time measurement.
virtual void stop ()=0
 Stop time measurement.
virtual void reset ()=0
 Reset time counters to zero.
bool isRunning ()
 Test whether the timer is running.
virtual const float getTime () const =0
 Get elapsed time Time in seconds after start.

Protected Attributes

bool m_running


Detailed Description

Cross-platform wall-clock timer.

Timer including multiple start-stop support Abstract base class. The application framework must provide an implementation and a method of creating instances


Member Function Documentation

virtual const float NvStopWatch::getTime (  )  const [pure virtual]

Get elapsed time Time in seconds after start.

If the stop watch is still running (i.e. there was no call to stop()) then the elapsed time is returned, otherwise the summed time between all start() and stop() calls is returned

Returns:
The elapsed time in seconds

bool NvStopWatch::isRunning (  )  [inline]

Test whether the timer is running.

Returns:
true if the timer is running (between start() and stop() calls) and false if not


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