libxr  1.0
Want to be the best embedded framework
Loading...
Searching...
No Matches
webots_timebase.cpp
1#include "webots_timebase.hpp"
2
3namespace LibXR
4{
6{
7 ConfigureWrapRange(UINT64_MAX, UINT32_MAX);
8 SetReady();
9}
10
12{
13 return _libxr_webots_time_count * 1000ULL;
14}
15
16MillisecondTimestamp Timebase::GetMilliseconds()
17{
18 return static_cast<uint32_t>(_libxr_webots_time_count);
19}
20} // namespace LibXR
微秒时间戳 / Microsecond timestamp
static void ConfigureWrapRange(uint64_t max_valid_us, uint32_t max_valid_ms) noexcept
配置时间戳回绕上界。 Configure the timestamp wraparound limits.
Definition timebase.hpp:95
static void SetReady(bool ready=true) noexcept
设置时间基就绪状态。 Set the timebase ready flag.
Definition timebase.hpp:85
static MicrosecondTimestamp GetMicroseconds()
获取当前时间的微秒级时间戳。 Gets the current timestamp in microseconds.
static MillisecondTimestamp GetMilliseconds()
获取当前时间的毫秒级时间戳。 Gets the current timestamp in milliseconds.
WebotsTimebase()
构造函数 / Constructor
LibXR 命名空间
Definition ch32_can.hpp:14