在线文档教程
C++
应用 | Utilities

std::chrono::ceil(std::chrono::time_point)

Std::Time::Ceil%28std::Time::Time[医]点%29

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

返回最小时间点。t可在ToDuration大于等于tp...

该函数不参与重载解析,除非ToDurationstd::chrono::duration...

参数

tp-time point to convert

返回值

d使用类型的持续时间舍入到下一个时间点。ToDuration...

可能的实施

模板<class T>结构是[医]持续时间:STD::false[医]类型{};模板<类Rep,类周期>结构是[医]持续时间<std::time::time<rep,time>>:std::true[医]类型{};模板<class到,类时钟,类FromDuration,class=std::Enable[医]如果[医]T<IS[医]持续时间<To>{}>>std::time::time[医]点<Clock,to>ceil%28 const std::chrono::time[医]点<时钟,倒转>&tp%29{返回std::chrono::time[医]点<Clock,to>{std::chrono::ceil<To>%28 tp.time[医]自[医]EIRCH%28%29%29};}

*。

另见

time_point_castconverts a time point to another time point on the same clock, with a different duration (function template)
floor(std::chrono::time_point) (C++17)converts a time_point to another, rounding down (function template)
round(std::chrono::time_point) (C++17)converts a time_point to another, rounding to nearest, ties to even (function template)
ceil(std::chrono::duration) (C++17)converts a duration to another, rounding up (function template)
ceilnearest integer not less than the given value (function)

© cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

http://en.cppreference.com/w/cpp/crono/time[医]点/细胞