![]() |
Trading System API
3.0
Library for Simulating and Deploying Trading and Investment Strategies
|
A timer. More...
#include <TSASupport.h>
Public Types |
Public Member Functions | |
timer (init_flag flag=timer::started) | |
Constructor. By default the timer will start timing immediately when constructed. Pass the timer::stopped flag to just construct the object. You need to call start() explicitly to start timing. More... | |
~timer (void) | |
Destructor. | |
double | milliseconds (void) const |
Returns the number of milliseconds elapsed as a floating point number. More... | |
double | seconds (void) const |
Returns the number of seconds elapsed as a floating point number. More... | |
void | start (void) |
Starts timing. | |
const timer & | stop (void) |
Stops the timer. More... | |
![]() | |
object (void) | |
Constructor. | |
virtual | ~object (void) |
Destructor. | |
const char * | class_name (void) const |
Returns the class name as returned by the 'Real Time Type Information' (RTTI) mechanism. More... | |
bool | has_same_class_as (const object &other) const |
Returns true if self has the same type as other object. More... | |
A timer.
Timer constructor flag.
Enumerator | |
---|---|
stopped |
Construct the timer object, but do not start timing.
|
started |
Start the timer immediately upon construction. |
tsa::timer::timer | ( | timer::init_flag | f = timer::started | ) |
Constructor. By default the timer will start timing immediately when constructed. Pass the timer::stopped flag to just construct the object. You need to call start() explicitly to start timing.
flag | Constructor flag. |
double tsa::timer::milliseconds | ( | void | ) | const |
Returns the number of milliseconds elapsed as a floating point number.
double tsa::timer::seconds | ( | void | ) | const |
Returns the number of seconds elapsed as a floating point number.
const timer & tsa::timer::stop | ( | void | ) |
Stops the timer.