28 #ifndef STEAM_PLAY_TICKSERVICE_H 29 #define STEAM_PLAY_TICKSERVICE_H 56 typedef function<void(void)> Tick;
57 volatile uint timespan_;
68 INFO (
steam,
"TickService started.");
77 INFO (
steam,
"TickService shutdown.");
89 ||( 1000000/fps < std::numeric_limits<uint>::max()
90 && 1000000/fps > POLL_TIMEOUT));
92 timespan_ = 1000000/fps;
99 void timerLoop(Tick periodicFun)
102 while (0 < timespan_)
104 if (timespan_ > POLL_TIMEOUT)
109 TRACE (proc_dbg,
"Tick Thread timer loop exiting...");
Variant of the standard case, requiring to wait and join() on the termination of this thread...
Steam-Layer implementation namespace root.
ThreadJoinable(string const &, FUN &&, ARGS &&...) -> ThreadJoinable< std::invoke_result_t< FUN, ARGS... >>
deduction guide: find out about result value to capture from a generic callable.
lib::Result< void > join()
put the caller into a blocking wait until this thread has terminated
Convenience front-end to simplify and codify basic thread handling.
Tick generating service for a periodic callback, with adjustable frequency.
void activate(uint fps)
set the periodic timer to run with a given frequency, starting now.
Lumiera error handling (C++ interface).
static const uint POLL_TIMEOUT
poll interval for new settings in wait state