35 Watchdog(units::second_t timeout, std::function<
void()> callback);
37 template <
typename Callable,
typename Arg,
typename... Args>
38 Watchdog(units::second_t timeout, Callable&& f, Arg&&
arg, Args&&... args)
40 std::bind(
std::forward<Callable>(f),
std::forward<Arg>(
arg),
41 std::forward<Args>(args)...)) {}
115 static constexpr auto kMinPrintPeriod = 1_s;
117 units::second_t m_startTime = 0_s;
118 units::second_t m_timeout;
119 units::second_t m_expirationTime = 0_s;
120 std::function<void()> m_callback;
121 units::second_t m_lastTimeoutPrintTime = 0_s;
124 bool m_isExpired =
false;
126 bool m_suppressTimeoutMessage =
false;
131 bool operator>(
const Watchdog& rhs)
const;
133 static Impl* GetImpl();
auto arg(const Char *name, const T &arg) -> detail::named_arg< Char, T >
Returns a named argument to be used in a formatting function.
Definition base.h:2775