LOOS 4.1.0
The Lightweight Object Oriented Structural analysis library/toolkit
|
Class for tracking time. More...
#include <loos_timer.hpp>
Public Member Functions | |
void | start (void) |
Starts the timer. | |
double | stop (void) |
Stops the timer. | |
double | elapsed (void) const |
Return the elapsed time. | |
double | lap (void) |
Returns the current lap time. | |
double | averageLapTime (void) |
Return the current average lap-time... | |
Public Member Functions inherited from loos::WallTimer | |
double | currentTime (void) const |
Class for tracking time.
Can either track wall-time or user-time, depending on the timer policy class used... The default is to track wall-time. Starting and stopping the timer does not actually do anything other than adjust how the current time is tracked, i.e. no real timers (interrupts, etc) are created.
Time is tracked to microsecond precision... See gettimeofday(2) or getrusage(2) for more information...
|
inline |
Return the elapsed time.
If the timer is running, it returns the difference between current time and when the timer was started. If the timer is stopped, then it returns the length of time the timer was active.
|
inline |
Returns the current lap time.
Lap time is a mechanism for tracking interval times. Each time lap() is called, it tracks not only the current lap-time but the average time for each lap. When the timer is stopped, a lap is automatically added.