#include <Timer.h>
Timer event class. Stores event data, including references to parent Timer and events map.
◆ Callback
Event callback definition. Events call that function when there is time for them to fire.
◆ EventData() [1/2]
sptk::Timer::EventData::EventData |
( |
const EventData & |
other | ) |
|
|
delete |
Disabled event copy constructor
- Parameters
-
◆ EventData() [2/2]
sptk::Timer::EventData::EventData |
( |
const DateTime & |
timestamp, |
|
|
const Callback & |
eventCallback, |
|
|
std::chrono::milliseconds |
repeatEvery, |
|
|
int |
repeatCount = -1 |
|
) |
| |
Constructor
- Parameters
-
timestamp | Fire at timestamp |
eventCallback | Event callback function |
repeatEvery | Event repeate interval |
repeatCount | Repeat count, -1 means no limit |
◆ fire()
bool sptk::Timer::EventData::fire |
( |
| ) |
|
Fire event by calling its callback function..
◆ getId()
const EventId & sptk::Timer::EventData::getId |
( |
| ) |
const |
- Returns
- Bookmark of event entry in events map.
◆ getInterval()
const std::chrono::milliseconds & sptk::Timer::EventData::getInterval |
( |
| ) |
const |
|
inline |
- Returns
- event repeat interval
◆ getRepeatCount()
int sptk::Timer::EventData::getRepeatCount |
( |
| ) |
const |
|
inline |
- Returns
- event repeat count
◆ getWhen()
const DateTime & sptk::Timer::EventData::getWhen |
( |
| ) |
const |
|
inline |
- Returns
- event fire at timestamp
◆ operator=()
Disabled event assignment
- Parameters
-
◆ shift()
bool sptk::Timer::EventData::shift |
( |
std::chrono::milliseconds |
interval | ) |
|
|
inline |
Add interval to event fire at timestamp
- Parameters
-
The documentation for this class was generated from the following file: