表示毫秒级时间戳的类。Class representing a timestamp in milliseconds.
More...
#include <libxr_time.hpp>
|
class | TimeDiffMS |
| 表示毫秒级时间差的类。Class representing a time difference in milliseconds. More...
|
|
|
uint32_t | millisecond_ |
| 以毫秒存储的时间戳。Timestamp stored in milliseconds.
|
|
表示毫秒级时间戳的类。Class representing a timestamp in milliseconds.
Definition at line 141 of file libxr_time.hpp.
◆ TimestampMS() [1/2]
LibXR::TimestampMS::TimestampMS |
( |
| ) |
|
|
inline |
Definition at line 144 of file libxr_time.hpp.
uint32_t millisecond_
以毫秒存储的时间戳。Timestamp stored in milliseconds.
◆ TimestampMS() [2/2]
LibXR::TimestampMS::TimestampMS |
( |
uint32_t | millisecond | ) |
|
|
inline |
◆ operator uint32_t()
LibXR::TimestampMS::operator uint32_t |
( |
| ) |
const |
|
inline |
◆ operator-()
计算两个时间戳之间的时间差。 Computes the time difference between two timestamps.
- Parameters
-
old_millisecond | 旧的时间戳。The older timestamp. |
- Returns
- TimeDiffMS 计算得到的时间差。Computed time difference.
Definition at line 205 of file libxr_time.hpp.
206 {
207 uint32_t diff;
208
210 {
212 }
213 else
214 {
215 diff =
millisecond_ + (libxr_timebase_max_valid_ms - old_millisecond.millisecond_);
216 }
217
218 ASSERT(diff <= libxr_timebase_max_valid_ms);
219
220 return TimeDiffMS(diff);
221 }
◆ millisecond_
uint32_t LibXR::TimestampMS::millisecond_ |
|
private |
以毫秒存储的时间戳。Timestamp stored in milliseconds.
Definition at line 224 of file libxr_time.hpp.
The documentation for this class was generated from the following file: