10 #include <type_traits>
13 using namespace std::literals::chrono_literals;
23 Timeout(
const std::chrono::milliseconds& duration) : ms{duration} {}
24 Timeout(
const std::int32_t& milliseconds) :
Timeout{std::chrono::milliseconds(milliseconds)} {}
25 template<
class Rep,
class Period >
26 Timeout(
const std::chrono::duration<Rep, Period> duration)
27 :
Timeout(std::chrono::duration_cast<std::chrono::milliseconds>(duration)) {}
29 std::chrono::milliseconds ms;