首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

std::chrono::time_point::operators (operator-)

(1)

time_point& operator+=( const duration& d );

(until C++17)

constexpr time_point& operator+=( const duration& d );

(since C++17)

(2)

time_point& operator-=( const duration& d );

(until C++17)

constexpr time_point& operator-=( const duration& d );

(since C++17)

根据给定的持续时间修改时间点。

1%29应用偏移量dpt有效地,d添加到内部存储的持续时间中。d_d_ += d...

2%29应用偏移量dpt向负方向。实际上,d从内部存储的持续时间中减去d_d_ -= d...

参数

d

-

a time offset to apply

返回值

*this...

例外

%280%29

另见

operator+operator-

modifies the time point by the given duration (function template)

代码语言:txt
复制
 © cppreference.com

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

扫码关注腾讯云开发者

领取腾讯云代金券