libxr
1.0
Want to be the best embedded framework
|
表示微秒级时间差的类。Class representing a time difference in microseconds. More...
#include <libxr_time.hpp>
Public Member Functions | |
Duration (uint64_t diff) | |
构造函数,初始化时间差。 Constructor initializing the time difference. | |
operator uint64_t () const | |
转换运算符,将时间差转换为 uint64_t。 Conversion operator to uint64_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. | |
uint64_t | ToMicrosecond () const |
以微秒返回时间差。 Returns the time difference in microseconds. | |
uint32_t | ToMillisecond () const |
以毫秒返回时间差。 Returns the time difference in milliseconds. | |
Private Attributes | |
uint64_t | diff_ |
存储时间差(微秒)。Time difference stored in microseconds. | |
表示微秒级时间差的类。Class representing a time difference in microseconds.
Definition at line 44 of file libxr_time.hpp.
|
inline |
构造函数,初始化时间差。 Constructor initializing the time difference.
diff | 以微秒表示的时间差。Time difference in microseconds. |
Definition at line 52 of file libxr_time.hpp.
|
inline |
转换运算符,将时间差转换为 uint64_t。 Conversion operator to uint64_t.
Definition at line 58 of file libxr_time.hpp.
|
inlinenodiscard |
以微秒返回时间差。 Returns the time difference in microseconds.
Definition at line 82 of file libxr_time.hpp.
|
inlinenodiscard |
以毫秒返回时间差。 Returns the time difference in milliseconds.
Definition at line 88 of file libxr_time.hpp.
|
inlinenodiscard |
以秒返回时间差(double 类型)。 Returns the time difference in seconds as a double.
Definition at line 64 of file libxr_time.hpp.
|
inlinenodiscard |
以秒返回时间差(float 类型)。 Returns the time difference in seconds as a float.
Definition at line 73 of file libxr_time.hpp.
|
private |
存储时间差(微秒)。Time difference stored in microseconds.
Definition at line 91 of file libxr_time.hpp.