std::chrono::time_point::operators (operator-)
STD::时间::时间[医]要点:操作员+,操作员-
| (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应用偏移量d
到pt
有效地,d
添加到内部存储的持续时间中。d_
如d_ += d
...
2%29应用偏移量d
到pt
向负方向。实际上,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) |
---|
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。