37 #ifndef STEAM_PLAY_TICKSERVICE_H 38 #define STEAM_PLAY_TICKSERVICE_H 65 typedef function<void(void)> Tick;
66 volatile uint timespan_;
77 INFO (
steam,
"TickService started.");
86 INFO (
steam,
"TickService shutdown.");
98 ||( 1000000/fps < std::numeric_limits<uint>::max()
99 && 1000000/fps > POLL_TIMEOUT));
101 timespan_ = 1000000/fps;
108 void timerLoop(Tick periodicFun)
111 while (0 < timespan_)
113 if (timespan_ > POLL_TIMEOUT)
118 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