35 const uint32_t defaultPeriod = 1000,
const std::unordered_set<std::string>& tags = {},
36 const std::string& periodName =
"period",
const std::string& tickName =
"tick")
38 period(
this, periodName,
"ms",
"period in milliseconds. The trigger is sent once per the specified duration."),
39 tick(
this, tickName,
"",
"Timer tick. Counts the trigger number starting from 0."),
40 _defaultPeriod(defaultPeriod) {}
63 std::chrono::time_point<std::chrono::steady_clock> t = std::chrono::steady_clock::now();
72 t += std::chrono::milliseconds(
static_cast<uint32_t
>(
period));
73 boost::this_thread::interruption_point();
74 std::this_thread::sleep_until(t);
81 uint32_t _defaultPeriod{};