libxr  1.0
Want to be the best embedded framework
Loading...
Searching...
No Matches
LibXR::WebotsTimebase Class Reference

WebotsTimebase 类,用于获取 Webots 的时间基准。Provides a timebase for Webots. More...

#include <webots_timebase.hpp>

Inheritance diagram for LibXR::WebotsTimebase:
[legend]
Collaboration diagram for LibXR::WebotsTimebase:
[legend]

Public Member Functions

MicrosecondTimestamp _get_microseconds ()
 获取当前时间戳(微秒级)。Returns the current timestamp in microseconds.
 
MillisecondTimestamp _get_milliseconds ()
 获取当前时间戳(毫秒级)
 
- Public Member Functions inherited from LibXR::Timebase
 Timebase (uint64_t max_valid_us=UINT64_MAX, uint32_t max_valid_ms=UINT32_MAX)
 默认构造函数,初始化全局时间基指针。 Default constructor, initializing the global timebase pointer.
 

Additional Inherited Members

- Static Public Member Functions inherited from LibXR::Timebase
static MicrosecondTimestamp GetMicroseconds ()
 获取当前时间的微秒级时间戳。 Gets the current timestamp in microseconds.
 
static MillisecondTimestamp GetMilliseconds ()
 获取当前时间的毫秒级时间戳。 Gets the current timestamp in milliseconds.
 
- Static Public Attributes inherited from LibXR::Timebase
static Timebasetimebase = nullptr
 静态指针,用于存储全局时间基对象。 Static pointer storing the global timebase instance.
 

Detailed Description

WebotsTimebase 类,用于获取 Webots 的时间基准。Provides a timebase for Webots.

Definition at line 12 of file webots_timebase.hpp.

Member Function Documentation

◆ _get_microseconds()

MicrosecondTimestamp LibXR::WebotsTimebase::_get_microseconds ( )
inlinevirtual

获取当前时间戳(微秒级)。Returns the current timestamp in microseconds.

Returns
MicrosecondTimestamp

Implements LibXR::Timebase.

Definition at line 20 of file webots_timebase.hpp.

20{ return _libxr_webots_time_count * 1000; }

◆ _get_milliseconds()

MillisecondTimestamp LibXR::WebotsTimebase::_get_milliseconds ( )
inlinevirtual

获取当前时间戳(毫秒级)

Returns
MillisecondTimestamp

Implements LibXR::Timebase.

Definition at line 27 of file webots_timebase.hpp.

27{ return _libxr_webots_time_count; }

The documentation for this class was generated from the following file: