libxr
1.0
Want to be the best embedded framework
|
表示毫秒级时间差的类。Class representing a time difference in milliseconds. More...
#include <libxr_time.hpp>
Public Member Functions | |
Duration (uint32_t diff) | |
构造函数,初始化时间差。 Constructor initializing the time difference. | |
operator uint32_t () const | |
转换运算符,将时间差转换为 uint32_t。 Conversion operator to uint32_t. | |
double | ToSecond () const |
以秒返回时间差(double 类型)。 Returns the time difference in seconds as a double. | |
float | ToSecondf () const |
以秒返回时间差(float 类型)。 Returns the time difference in seconds as a float. | |
uint32_t | ToMillisecond () const |
以毫秒返回时间差。 Returns the time difference in milliseconds. | |
uint64_t | ToMicrosecond () const |
以微秒返回时间差。 Returns the time difference in microseconds. | |
Private Attributes | |
uint32_t | diff_ |
存储时间差(毫秒)。Time difference stored in milliseconds. | |
表示毫秒级时间差的类。Class representing a time difference in milliseconds.
Definition at line 152 of file libxr_time.hpp.
|
inline |
构造函数,初始化时间差。 Constructor initializing the time difference.
diff | 以毫秒表示的时间差。Time difference in milliseconds. |
Definition at line 160 of file libxr_time.hpp.
|
inline |
转换运算符,将时间差转换为 uint32_t。 Conversion operator to uint32_t.
Definition at line 166 of file libxr_time.hpp.
|
inlinenodiscard |
以微秒返回时间差。 Returns the time difference in microseconds.
Definition at line 190 of file libxr_time.hpp.
|
inlinenodiscard |
以毫秒返回时间差。 Returns the time difference in milliseconds.
Definition at line 184 of file libxr_time.hpp.
|
inlinenodiscard |
以秒返回时间差(double 类型)。 Returns the time difference in seconds as a double.
Definition at line 172 of file libxr_time.hpp.
|
inlinenodiscard |
以秒返回时间差(float 类型)。 Returns the time difference in seconds as a float.
Definition at line 178 of file libxr_time.hpp.
|
private |
存储时间差(毫秒)。Time difference stored in milliseconds.
Definition at line 196 of file libxr_time.hpp.