15 unsigned int timeout_goal;
48#if __has_include(<cereal/cereal.hpp>)
53 template <
class Archive>
56 int goal = timeout_goal;
65 template <
class Archive>
71 reset(std::chrono::high_resolution_clock::now() - std::chrono::microseconds(
elapsed));
A wrapper for std::vector.
Definition array.hpp:72
A class for easily managing timing.
Definition timeout.hpp:13
void load(Archive &ar)
Serialization input.
Definition timeout.hpp:66
timeout(unsigned int timeout_micros=-1, bool run=true) noexcept
Timeout constructor.
bool timedOut() const noexcept
Check whether the timer has timed out.
void setTimeOut(unsigned int timeout_micros) noexcept
Set the time out goal.
void save(Archive &ar) const
Serialization output.
Definition timeout.hpp:54
A class for easily managing timers.
Definition timer.hpp:19
void reset() noexcept
Reset the timer.
unsigned int micros() const noexcept
Get the elapsed time in microseconds.