命名空间
变体
操作

std::chrono::time_point<Clock,Duration>::operator+=, operator-=

来自 cppreference.cn
< cpp‎ | chrono‎ | time point
 
 
 
 
time_point& operator+=( const duration& d );
(1) (since C++11)
(constexpr since C++17)
time_point& operator-=( const duration& d );
(2) (since C++11)
(constexpr since C++17)

通过给定的时长修改时间点。

1) 将偏移量 d 应用于 pt。 有效地,d 被添加到内部存储的时长 d_,如同 d_ += d
2) 在负方向上将偏移量 d 应用于 pt。 有效地,d 从内部存储的时长 d_ 中减去,如同 d_ -= d

目录

[edit] 参数

d - 要应用的时间偏移

[edit] 返回值

*this

[edit] 异常

可能抛出实现定义的异常。

[edit] 示例

[edit] 参见

执行涉及时间点的加法和减法运算
(函数模板) [edit]