14#include <asio/high_resolution_timer.hpp>
18 template<
typename Clock>
class TTimer {
The AnyExecutor type is a polymorphic executor that supports the set of properties required by I/O ob...
Definition ExecutionContext.hpp:309
TTimer(AnyIOExecutor executor, TimePoint timePoint, Callback callback)
Duration mRepeatInterval
Definition Timer.hpp:30
Callback mCallback
Definition Timer.hpp:28
void setup(Duration duration)
static UPtr< TTimer > create(AnyIOExecutor executor, Duration duration, Callback callback, bool repeating=false)
TimerType mTimer
Definition Timer.hpp:26
TTimer(AnyIOExecutor executor, Duration duration, Callback callback, Duration repeatInterval)
asio::basic_waitable_timer< Clock, asio::wait_traits< Clock >, AnyIOExecutor > TimerType
Definition Timer.hpp:25
typename Clock::duration Duration
Definition Timer.hpp:21
bool mRepeating
Definition Timer.hpp:29
TTimer(AnyIOExecutor executor, TimePoint timePoint, Callback callback, Duration repeatInterval)
TTimer(AnyIOExecutor executor, Duration duration, Callback callback, bool repeating=false)
UniqueFunction< void(TTimer *)> Callback
Definition Timer.hpp:22
typename Clock::time_point TimePoint
Definition Timer.hpp:20
Definition Application.hpp:19
std::unique_ptr< T, Deleter > UPtr
UPtr is a smart pointer that owns and manages another object through a pointer and disposes of that o...
Definition SmartPtr.hpp:28
FunctionBase< true, false, fu2::capacity_default, true, false, Signatures... > UniqueFunction
An owning non copyable function wrapper for arbitrary callable types.
Definition Function.hpp:59
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25