11 #include "HAL/cpp/priority_mutex.h"
13 typedef void (*TimerInterruptHandler)(
void *param);
15 void Wait(
double seconds);
32 virtual ~
Timer() =
default;
44 static double GetPPCTimestamp();
45 static double GetMatchTime();
48 static const double kRolloverTime;
51 double m_startTime = 0.0;
52 double m_accumulatedTime = 0.0;
53 bool m_running =
false;
bool HasPeriodPassed(double period)
Check if the period specified has passed and if it has, advance the start time by that period...
Definition: Timer.cpp:148
void Stop()
Stop the timer.
Definition: Timer.cpp:130
double Get() const
Get the current time from the timer.
Definition: Timer.cpp:78
Timer()
Create a new timer object.
Definition: Timer.cpp:63
Definition: priority_mutex.h:53
void Start()
Start the timer running.
Definition: Timer.cpp:116
static double GetFPGATimestamp()
Return the FPGA system clock time in seconds.
Definition: Timer.cpp:167
void Reset()
Reset the timer by setting the time to 0.
Definition: Timer.cpp:105
Timer objects measure accumulated time in seconds.
Definition: Timer.h:29