载入中...
搜索中...
未找到
Time.h
浏览该文件的文档.
110 explicit constexpr MonotonicTimestamp(std::int64_t nanoseconds) noexcept : nanoseconds_(nanoseconds) {}
144 explicit constexpr WallClockTimestamp(std::int64_t unixNanoseconds) noexcept : unixNanoseconds_(unixNanoseconds) {}
147 [[nodiscard]] constexpr std::int64_t unixNanoseconds() const noexcept { return unixNanoseconds_; }
208 explicit SimulationClock(ITimeSource& source, Duration fixedStep = Duration::fromNanoseconds(16666667));
#define EVENGINE_API_FOUNDATION_INLINE
仅供"只有内联成员"的类型使用的组宏:拥有者 dllexport,消费方不导入。
Definition Export.h:170
Move-only, checked operation results for the common layer.
Internal storage primitive for domain-owned unsigned values.
constexpr std::int64_t nanoseconds() const noexcept
Return the exact signed nanosecond representation.
Definition Time.h:69
friend constexpr bool operator==(Duration, Duration) noexcept=default
static constexpr Duration fromNanoseconds(std::int64_t nanoseconds) noexcept
Construct an exact duration from nanoseconds.
Definition Time.h:55
friend constexpr auto operator<=>(Duration, Duration) noexcept=default
Operator <=>.
virtual MonotonicTimestamp monotonicNow() const =0
Read the non-decreasing source-relative timestamp.
virtual WallClockTimestamp wallClockNow() const =0
Read wall-clock metadata.
friend constexpr auto operator<=>(MonotonicTimestamp, MonotonicTimestamp) noexcept=default
Operator <=>.
friend constexpr bool operator==(MonotonicTimestamp, MonotonicTimestamp) noexcept=default
constexpr std::int64_t nanoseconds() const noexcept
Return source-relative nanoseconds.
Definition Time.h:116
constexpr MonotonicTimestamp() noexcept=default
Construct the zero timestamp.
Owner-thread fixed-step scheduler driven by an injected time source.
Definition Time.h:201
Duration lastFrameDelta() const noexcept
Real source duration observed during the last frame.
Definition Time.h:241
Wall-clock timestamp used only for metadata and diagnostics.
Definition Time.h:138
constexpr std::int64_t unixNanoseconds() const noexcept
Return Unix-epoch nanoseconds for metadata serialization.
Definition Time.h:147
friend constexpr auto operator<=>(WallClockTimestamp, WallClockTimestamp) noexcept=default
Operator <=>.
friend constexpr bool operator==(WallClockTimestamp, WallClockTimestamp) noexcept=default
constexpr WallClockTimestamp() noexcept=default
Construct the Unix epoch timestamp.
Definition Container.h:602