EMANE
1.2.1
|
A timer class that uses Linux interval timers. More...
#include <timer.h>
Classes | |
class | TimerException |
Public Types | |
using | TimerId = std::size_t |
Public Member Functions | |
Timer () | |
~Timer () | |
bool | cancel (TimerId timerId) |
template<typename Function > | |
TimerId | schedule (Function fn, const TimePoint &absoluteTimePoint) |
template<typename Function > | |
TimerId | scheduleInterval (Function fn, const TimePoint &absoluteTimePoint, const Duration &interval) |
template<typename Function > | |
EMANE::Utils::Timer::TimerId | schedule (Function fn, const TimePoint &absoluteTimePoint) |
template<typename Function > | |
EMANE::Utils::Timer::TimerId | scheduleInterval (Function fn, const TimePoint &absoluteTimePoint, const Duration &interval) |
using EMANE::Utils::Timer::TimerId = std::size_t |
EMANE::Utils::Timer::Timer | ( | ) |
Creates an timer
TimerException | when an internal exception occurs. |
bool EMANE::Utils::Timer::cancel | ( | TimerId | timerId | ) |
EMANE::Utils::Timer::TimerId EMANE::Utils::Timer::schedule | ( | Function | fn, |
const TimePoint & | absoluteTimePoint | ||
) |
TimerId EMANE::Utils::Timer::schedule | ( | Function | fn, |
const TimePoint & | absoluteTimePoint | ||
) |
Sechules a one shot timer
fn | A callable object that takes a single TimerId parameter |
absoluteTimePoint | Absolute time of the timeout |
EMANE::Utils::Timer::TimerId EMANE::Utils::Timer::scheduleInterval | ( | Function | fn, |
const TimePoint & | absoluteTimePoint, | ||
const Duration & | interval | ||
) |
TimerId EMANE::Utils::Timer::scheduleInterval | ( | Function | fn, |
const TimePoint & | absoluteTimePoint, | ||
const Duration & | interval | ||
) |
Sechules an interval timer
fn | A callable object that takes a single TimerId parameter |
absoluteTimePoint | Absolute time of the timeout |
interval | Repeat interval |