HARDT - The Ham Radio DSP Toolkit
Public Member Functions | List of all members
HTimer Class Reference

#include <htimer.h>

Public Member Functions

 HTimer ()
 
 HTimer (char *stop)
 
 HTimer (char *start, char *stop)
 
 HTimer (long duration)
 
void SetStart (char *datetime)
 
void SetStop (char *datetime)
 
long Duration ()
 
bool Active ()
 
bool Before ()
 
bool After ()
 
void Wait ()
 
time_t Start ()
 
time_t Stop ()
 

Detailed Description

Timer that will wait to the given date and time

Constructor & Destructor Documentation

◆ HTimer() [1/4]

HTimer::HTimer ( )

Create a new timer

◆ HTimer() [2/4]

HTimer::HTimer ( char *  stop)

Create a new timer with a start date and time of NOW and a given stop date and time. The stop definition has the format "%HH:%MM" or "%YYYY-%mm-%dd %HH:%MM" (H = Hour, M = minute, Y = Year, m = month, d = day)

◆ HTimer() [3/4]

HTimer::HTimer ( char *  start,
char *  stop 
)

Create a new timer with a given start and stop date and time The start and stop definition has the format "%HH:%MM" or "%YYYY-%mm-%dd %HH:%MM" (H = Hour, M = minute, Y = Year, m = month, d = day)

◆ HTimer() [4/4]

HTimer::HTimer ( long  duration)
inline

Create a new timer that waits for a given duration (seconds)

Member Function Documentation

◆ Active()

bool HTimer::Active ( )
inline

Returns true if the timer is currently active, thus would not block in Wait()

◆ After()

bool HTimer::After ( )
inline

Returns true if the timer is currently active and the stop time has arrived, thus would not block in Wait()

◆ Before()

bool HTimer::Before ( )
inline

Returns true if the timer is currently active and the start time has not yet arrived, thus would block in Wait()

◆ Duration()

long HTimer::Duration ( )
inline

Return the duration left before the timer continues

◆ SetStart()

void HTimer::SetStart ( char *  datetime)

Set a (new) start date and time The datetime definition has the format "%HH:%MM" or "%YYYY-%mm-%dd %HH:%MM" (H = Hour, M = minute, Y = Year, m = month, d = day)

◆ SetStop()

void HTimer::SetStop ( char *  datetime)

Set a (new) stop date and time The datetime definition has the format "%HH:%MM" or "%YYYY-%mm-%dd %HH:%MM" (H = Hour, M = minute, Y = Year, m = month, d = day)

◆ Start()

time_t HTimer::Start ( )
inline

Return the current start date and time

◆ Stop()

time_t HTimer::Stop ( )
inline

Return the current stop date and time

◆ Wait()

void HTimer::Wait ( )

Block untill the timer expires


The documentation for this class was generated from the following files: