|
HARDT - The Ham Radio DSP Toolkit
|
#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 () |
Timer that will wait to the given date and time
| HTimer::HTimer | ( | ) |
Create a new timer
| 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::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)
|
inline |
Create a new timer that waits for a given duration (seconds)
|
inline |
Returns true if the timer is currently active, thus would not block in Wait()
|
inline |
Returns true if the timer is currently active and the stop time has arrived, thus would not block in Wait()
|
inline |
Returns true if the timer is currently active and the start time has not yet arrived, thus would block in Wait()
|
inline |
Return the duration left before the timer continues
| 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)
| 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)
|
inline |
Return the current start date and time
|
inline |
Return the current stop date and time
| void HTimer::Wait | ( | ) |
Block untill the timer expires
1.8.17