cinder::Timer Class Reference

A high-resolution timer class. More...

#include <Timer.h>

List of all members.

Public Member Functions

 Timer ()
 Constructs a default timer which is initialized as stopped.
 Timer (bool startOnConstruction)
 Constructs a default timer which is initialized as running unless startOnConstruction is false.
void start ()
 Begins timing.
double getSeconds () const
 Returns the elapsed seconds if the timer is running, or the total time between calls to start() and stop() if it is stopped.
void stop ()
 Ends timing.
bool isStopped () const
 Returns whether the timer is currently running.

Detailed Description

A high-resolution timer class.


Constructor & Destructor Documentation

cinder::Timer::Timer (  ) 

Constructs a default timer which is initialized as stopped.

cinder::Timer::Timer ( bool  startOnConstruction  ) 

Constructs a default timer which is initialized as running unless startOnConstruction is false.


Member Function Documentation

void cinder::Timer::start (  ) 

Begins timing.

double cinder::Timer::getSeconds (  )  const

Returns the elapsed seconds if the timer is running, or the total time between calls to start() and stop() if it is stopped.

void cinder::Timer::stop (  ) 

Ends timing.

bool cinder::Timer::isStopped (  )  const

Returns whether the timer is currently running.


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