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 123 of file libxr_time.hpp.
MillisecondTimestamp::Duration::Duration | ( | uint32_t | diff | ) |
构造函数,初始化时间差。 Constructor initializing the time difference.
diff | 以毫秒表示的时间差。Time difference in milliseconds. |
Definition at line 78 of file libxr_time.cpp.
MillisecondTimestamp::Duration::operator uint32_t | ( | ) | const |
转换运算符,将时间差转换为 uint32_t。 Conversion operator to uint32_t.
Definition at line 80 of file libxr_time.cpp.
|
nodiscard |
以微秒返回时间差。 Returns the time difference in microseconds.
Definition at line 97 of file libxr_time.cpp.
|
nodiscard |
以毫秒返回时间差。 Returns the time difference in milliseconds.
Definition at line 92 of file libxr_time.cpp.
|
nodiscard |
以秒返回时间差(double 类型)。 Returns the time difference in seconds as a double.
Definition at line 82 of file libxr_time.cpp.
|
nodiscard |
以秒返回时间差(float 类型)。 Returns the time difference in seconds as a float.
Definition at line 87 of file libxr_time.cpp.
|
private |
存储时间差(毫秒)。Time difference stored in milliseconds.
Definition at line 164 of file libxr_time.hpp.