14 p_ellapsedTime(ellapsedTime)
66 time_t ellapsedTimeNs(0lu);
67 return isTime(ellapsedTimeNs, currentTime);
Timer which allows to call function every time a defined ellapsed time is out.
time_t p_ellapsedTime
Ellapsed time between to isTime() returns true (in nanoseconds)
void setEllapsedTime(time_t ellapsedTime)
Set the ellapsed time in nanoseconds.
time_t getEllapsedTime() const
Get the ellapsed time in nanoseconds.
void setStartTime(time_t startTime)
Start the current clock.
PTimer(time_t ellapsedTime=1lu)
Default constructor of PTimer.
bool isTime(time_t currentTime)
Returns true if the given ellapsed time between to call is passed.
void initialisationPTimer()
Initialisation function of the class PTimer.
time_t p_startTime
Clock of the PTimer.
virtual ~PTimer()
Destructor of PTimer.
void copyPTimer(const PTimer &other)
Copy function of PTimer.
PTimer & operator=(const PTimer &other)
Definition of equal operator of PTimer.