EpuckTimer Class Reference
A timer class. More...
#include <timer.hpp>
Collaboration diagram for EpuckTimer:
Detailed Description
A timer class.
Provides a timer with resolution of milliseconds.
- Date
- August 2008
Public Member Functions | |
double | initialize (double startTime=0.0) |
Set the start time. More... | |
double | elapsedTime () |
Get the time elapsed since the initialization. More... | |
void | resetInterval () |
Start a new interval. More... | |
double | intervalDelay () |
Get the time elapsed since the last call at resetInterval. More... | |
Private Member Functions | |
double | currentTime () |
Private Attributes | |
double | offset |
struct TIMEB | t |
double | t0 |
double | t1 |
double | t2 |
bool | intervalRunning |
Member Function Documentation
◆ elapsedTime()
|
inline |
Get the time elapsed since the initialization.
Get the time elapsed since the initialization, plus the offset that was given.
- Returns
- The elapsed time, in seconds.
◆ initialize()
|
inline |
Set the start time.
- Parameters
-
startTime Start time offset in seconds.
- Returns
- The start time, i.e. the time since 00:00:00 UTC in seconds.
◆ intervalDelay()
|
inline |
Get the time elapsed since the last call at resetInterval.
Return the elapsed time since resetInterval was called at last time. Case it wasn't yet called the delta time will be 0.
- Returns
- The elapsed time in seconds.
Referenced by EpuckPosition2d::UpdateOdometry().
◆ resetInterval()
|
inline |
Start a new interval.
Start a new interval which will be intervalDelay.
Referenced by EpuckPosition2d::UpdateOdometry().
The documentation for this class was generated from the following file: