#include <smartITimerManager.h>
◆ TimerId
◆ ~ITimerManager()
virtual Smart::ITimerManager::~ITimerManager |
( |
| ) |
|
|
virtualdefault |
◆ cancelTimer()
virtual int Smart::ITimerManager::cancelTimer |
( |
const TimerId & |
timer_id, |
|
|
const void ** |
act = nullptr |
|
) |
| |
|
pure virtual |
Cancel a single timer.
- Parameters
-
timer_id | to cancel |
act | a pointer (to a pointer) to retrieve the act that was given on scheduleTimer(). Can be used to release resources (see Asynchronous Completion Token (ACT), POSA2). owned by act. If act == nullptr, nothing is retrieved. |
- Returns
- 0 on success
-
-1 on error
◆ cancelTimersOf()
virtual int Smart::ITimerManager::cancelTimersOf |
( |
ITimerHandler * |
handler | ) |
|
|
pure virtual |
Cancel all timers associated with a handler.
- Parameters
-
handler | cancel timers associated with this handler |
- Returns
- number of timers canceled.
◆ deleteAllTimers()
virtual void Smart::ITimerManager::deleteAllTimers |
( |
| ) |
|
|
pure virtual |
Delete all currently scheduled timers.
◆ resetTimerInterval()
virtual int Smart::ITimerManager::resetTimerInterval |
( |
const TimerId & |
timer_id, |
|
|
const Duration & |
interval |
|
) |
| |
|
pure virtual |
Resets the interval of a timer.
- Parameters
-
timer_id | to change |
interval | new timer interval (relative to the current time) |
- Returns
- 0 on success
-
-1 on error
◆ scheduleTimer()
Schedule a timer.
- Parameters
-
handler | The handler that will be called when the timer expires. |
act | a value that will be passed to the handler (see Asynchronous Completion Token (ACT), POSA2) |
oneshot_time | relative time for the first timer expiration |
interval | Interval for periodic timers. A single shot timer is scheduled by default. |
- Returns
- timer_id: -1 on failure. Unique time id else. This id can be used to cancel a timer before it expires with cancelTimer() and to change the the interval of a timer with resetTimerInterval().
The documentation for this class was generated from the following file: