11 #include <boost/date_time/posix_time/posix_time_types.hpp> 23 return std::chrono::seconds(timeout);
27 return std::chrono::milliseconds(timeout);
32 template <
typename Rep,
typename Period>
35 const auto count = std::chrono::duration_cast<std::chrono::milliseconds>(duration).count();
37 return static_cast<size_t>(count);
54 operator boost::posix_time::time_duration()
const {
static time_duration milliseconds(size_t timeout)
boost::posix_time::time_duration to_posix_time() const
time_duration(boost::posix_time::time_duration timeout)
constexpr time_duration() noexcept
This file contains definitions of common data structures used in traffic manager. ...
time_duration(std::chrono::duration< Rep, Period > duration)
static time_duration seconds(size_t timeout)
#define DEBUG_ASSERT(predicate)
constexpr size_t milliseconds() const noexcept
time_duration & operator=(const time_duration &)=default
Positive time duration up to milliseconds resolution.
constexpr auto to_chrono() const