载入中...
搜索中...
未找到
eve::ITimeSource类 参考abstract
Injectable source for elapsed and metadata time. 更多...
#include <Time.h>
类 eve::ITimeSource 继承关系图:
Public 成员函数 | |
| virtual | ~ITimeSource ()=default |
| I time source. | |
| virtual MonotonicTimestamp | monotonicNow () const =0 |
| Read the non-decreasing source-relative timestamp. | |
| virtual WallClockTimestamp | wallClockNow () const =0 |
| Read wall-clock metadata. | |
静态 Public 属性 | |
| static constexpr const char * | capabilityName = "ITimeSource" |
详细描述
Injectable source for elapsed and metadata time.
Implementations must document their thread affinity. The default engine Timer is owner-thread-only; callers must not invoke it concurrently. This interface never advances simulation state and never exposes a wall clock to simulation consumers.
构造及析构函数说明
◆ ~ITimeSource()
|
virtualdefault |
I time source.
成员函数说明
◆ monotonicNow()
|
pure virtual |
Read the non-decreasing source-relative timestamp.
- 返回
- Monotonic timestamp; must not be used as persisted state.
在 eve::timer::Timer 内被实现.
被这些函数引用 eve::SimulationClock::sample().
◆ wallClockNow()
|
pure virtual |
Read wall-clock metadata.
- 返回
- Unix timestamp; never use this value for simulation progression.
在 eve::timer::Timer 内被实现.
类成员变量说明
◆ capabilityName
|
staticconstexpr |
该类的文档由以下文件生成:
- src/engine/common/Time.h