表示毫秒级时间戳的类。Class representing a timestamp in milliseconds.
More...
#include <libxr_time.hpp>
|
class | TimeDiffMS |
| 表示毫秒级时间差的类。Class representing a time difference in milliseconds. More...
|
|
表示毫秒级时间戳的类。Class representing a timestamp in milliseconds.
Definition at line 135 of file libxr_time.hpp.
◆ TimestampMS() [1/2]
LibXR::TimestampMS::TimestampMS |
( |
| ) |
|
|
inline |
Definition at line 138 of file libxr_time.hpp.
uint32_t millisecond_
以毫秒存储的时间戳。Timestamp stored in milliseconds.
◆ TimestampMS() [2/2]
LibXR::TimestampMS::TimestampMS |
( |
uint32_t |
millisecond | ) |
|
|
inline |
Definition at line 139 of file libxr_time.hpp.
constexpr auto min(T1 a, T2 b) -> typename std::common_type< T1, T2 >::type
计算两个数的最小值
◆ 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 196 of file libxr_time.hpp.
197 {
199
201 {
203 }
204 else
205 {
207 }
208
209 ASSERT(
diff <= libxr_timebase_max_valid_ms);
210
211 return TimeDiffMS(
diff);
212 }
◆ millisecond_
uint32_t LibXR::TimestampMS::millisecond_ |
|
private |
以毫秒存储的时间戳。Timestamp stored in milliseconds.
Definition at line 215 of file libxr_time.hpp.
The documentation for this class was generated from the following file: