Duration 表示一个实践段,由时刻(tick)和时刻数组成 std::chrono::duration<int,std::ratio<3600>> hours(1); std::chrono::duration<int,std::ratio<60>> minutes(14); std::
std::ratio提供了编译器有理数支持 定义如下: template< std::intmax_t Num, std::intmax_t Denom = 1 > class ratio; 其中std::intmax_t是编译器常量,分母不能是0,通知分子和分母不能是最大的负值
文章
分类
访问量
建站天数
标签目录
最近评论