![]() |
Cinder
0.9.1
|
#include <Timer.h>
Public Member Functions | |
Timer () | |
Timer (bool startOnConstruction) | |
void | start (double offsetSeconds=0) |
double | getSeconds () const |
void | stop () |
void | resume () |
bool | isStopped () const |
A high-resolution timer class.
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.
void cinder::Timer::start | ( | double | offsetSeconds = 0 | ) |
Begins timing. Optional offsetSeconds parameter allows a relative offset.
double cinder::Timer::getSeconds | ( | ) | const |
void cinder::Timer::stop | ( | ) |
Ends timing.
void cinder::Timer::resume | ( | ) |
Resumes timing without resetting the timer.
bool cinder::Timer::isStopped | ( | ) | const |
Returns whether the timer is currently running.