12 #ifndef INCLUDE_DISTORTOS_DYNAMICSOFTWARETIMER_HPP_ 13 #define INCLUDE_DISTORTOS_DYNAMICSOFTWARETIMER_HPP_ 44 template<
typename Function,
typename... Args>
73 template<
typename Function,
typename... Args>
76 return {std::forward<Function>(
function), std::forward<Args>(args)...};
81 template<
typename Function,
typename... Args>
84 boundFunction_{std::bind(std::forward<Function>(
function), std::forward<Args>(args)...)}
91 #endif // INCLUDE_DISTORTOS_DYNAMICSOFTWARETIMER_HPP_ DynamicSoftwareTimer makeDynamicSoftwareTimer(Function &&function, Args &&... args)
Helper factory function to make DynamicSoftwareTimer object.
Definition: DynamicSoftwareTimer.hpp:74
std::function< void()> boundFunction_
bound function object
Definition: DynamicSoftwareTimer.hpp:58
DynamicSoftwareTimer class is a type-erased interface for software timer that has dynamic storage for...
Definition: DynamicSoftwareTimer.hpp:30
void run() override
"Run" function of software timer
Definition: DynamicSoftwareTimer.cpp:21
DynamicSoftwareTimer(Function &&function, Args &&... args)
DynamicSoftwareTimer's constructor.
Definition: DynamicSoftwareTimer.hpp:82
Top-level namespace of distortos project.
Definition: buttons.hpp:33
SoftwareTimerCommon class header.
SoftwareTimerCommon class implements common functionality of software timers.
Definition: SoftwareTimerCommon.hpp:28