载入中...
搜索中...
未找到
eve::MonotonicTimestamp类 参考
Timestamp from a monotonic source. 更多...
#include <Time.h>
Public 成员函数 | |
| constexpr | MonotonicTimestamp () noexcept=default |
| Construct the zero timestamp. | |
| constexpr | MonotonicTimestamp (std::int64_t nanoseconds) noexcept |
| Construct a timestamp from source-relative nanoseconds. | |
| constexpr std::int64_t | nanoseconds () const noexcept |
| Return source-relative nanoseconds. | |
| Result< Duration > | since (MonotonicTimestamp earlier) const |
| Compute elapsed duration from an earlier timestamp. | |
静态 Public 成员函数 | |
| static constexpr MonotonicTimestamp | zero () noexcept |
| Return the zero timestamp. | |
友元 | |
| constexpr bool | operator== (MonotonicTimestamp, MonotonicTimestamp) noexcept=default |
| constexpr auto | operator<=> (MonotonicTimestamp, MonotonicTimestamp) noexcept=default |
| Operator <=>. | |
详细描述
Timestamp from a monotonic source.
Its epoch is local to the source and must not be persisted or compared with a timestamp produced by another source. It is appropriate for measuring elapsed real time at the scheduler boundary.
构造及析构函数说明
◆ MonotonicTimestamp() [1/2]
|
constexprdefaultnoexcept |
Construct the zero timestamp.
◆ MonotonicTimestamp() [2/2]
|
inlineexplicitconstexprnoexcept |
成员函数说明
◆ nanoseconds()
|
inlineconstexprnoexcept |
◆ since()
| Result< Duration > eve::MonotonicTimestamp::since | ( | MonotonicTimestamp | earlier | ) | const |
Compute elapsed duration from an earlier timestamp.
- 返回
- A checked non-negative duration; backward movement is rejected.
引用了 distance, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvariantViolation, eve::PreconditionViolation , 以及 eve::Result< T >::success().
被这些函数引用 eve::timer::Timer::getTime() , 以及 eve::SimulationClock::sample().
◆ zero()
|
inlinestaticconstexprnoexcept |
友元及相关函数文档
◆ operator<=>
|
friend |
Operator <=>.
◆ operator==
|
friend |
该类的文档由以下文件生成: