Cortex
10.0.0-a4
|
#include <Timer.h>
Public Member Functions | |
Timer (bool start=true) | |
void | start () |
double | stop () |
bool | running () |
Returns true if the timer is running. | |
double | currentElapsed () const |
double | totalElapsed () const |
A class useful for simple timing of operations. This simply wraps boost::timer with a more flexible interface that allows for starting and stopping while accumulating elapsed time. Time values returned are in seconds.
IECore::Timer::Timer | ( | bool | start = true | ) |
Creates a new timer. If startAlready is true then calls start(), otherwise the timer is created stopped.
double IECore::Timer::currentElapsed | ( | ) | const |
Returns the time elapsed since the last call to start(), or 0 if timer is not running.
void IECore::Timer::start | ( | ) |
Starts the timer. Throws an Exception if it's already running.
double IECore::Timer::stop | ( | ) |
double IECore::Timer::totalElapsed | ( | ) | const |