std::chrono::round(std::chrono::time_point)

std::chrono::round(std::chrono::time_point)

Defined in header <chrono>
template <class ToDuration, class Clock, class Duration>
constexpr time_point<Clock, ToDuration> round(const time_point<Clock, Duration>& tp);
(since C++17)

Returns the nearest time point to tp representable in ToDuration, rounding to even in halfway cases.

The function does not participate in the overload resolution unless ToDuration is an specialization of 登录查看完整内容