![]() |
Computer Assited Medical Intervention Tool Kit
version 4.1
|
Elapsed real-time timer. More...
#include <Chrono.h>
Public Member Functions | |
| Chrono () | |
| default constructor More... | |
| Chrono (double) | |
| new chrono that starts directly at the given time More... | |
| double | get () const |
| if running, get the value (start time - now) without stopping the chrono, else get (start time - stop time) value this method is declared to be const, because we need to call it in << (and of course, no data member is modified More... | |
| void | hold (bool) |
| pause the chrono if the parameter is true More... | |
| void | reset () |
| reset to zero More... | |
| void | start () |
| start at zero More... | |
| void | start (double) |
| start at a given value More... | |
| double | stop () |
| stop chrono More... | |
| ~Chrono ()=default | |
Private Member Functions | |
| double | getTimeInMilliseconds () const |
| in milliseconds More... | |
Private Attributes | |
| double | accumulatedTime |
| bool | running |
| double | startValue |
| double | stopValue |
Friends | |
| std::ostream & | operator<< (std::ostream &, const Chrono) |
| print the value of the chrono on the stream More... | |
Elapsed real-time timer.
Allows one to measure elapsed real time. You can start, stop, reset and of course get and print the current values of this chronometer.
| Chrono::Chrono | ( | ) |
default constructor
| Chrono::Chrono | ( | double | init | ) |
new chrono that starts directly at the given time
|
default |
| double Chrono::get | ( | ) | const |
if running, get the value (start time - now) without stopping the chrono, else get (start time - stop time) value this method is declared to be const, because we need to call it in << (and of course, no data member is modified
Referenced by operator<<().
|
private |
in milliseconds
| void Chrono::hold | ( | bool | pause | ) |
pause the chrono if the parameter is true
| void Chrono::reset | ( | ) |
reset to zero
| void Chrono::start | ( | ) |
start at zero
Referenced by InteractiveMonitoringManager::doMove().
| void Chrono::start | ( | double | init | ) |
start at a given value
| double Chrono::stop | ( | ) |
stop chrono
Referenced by InteractiveMonitoringManager::doMove().
|
friend |
print the value of the chrono on the stream
|
private |
|
private |
|
private |
|
private |
1.8.13