libxr
1.0
Want to be the best embedded framework
|
表示微秒级时间戳的类。Class representing a timestamp in microseconds. More...
#include <libxr_time.hpp>
Data Structures | |
class | Duration |
表示微秒级时间差的类。Class representing a time difference in microseconds. More... | |
Public Member Functions | |
MicrosecondTimestamp () | |
默认构造函数,初始化时间戳为 0。 Default constructor initializing the timestamp to 0. | |
MicrosecondTimestamp (uint64_t microsecond) | |
以给定的微秒值构造时间戳。 Constructor initializing the timestamp with a given microsecond value. | |
operator uint64_t () const | |
转换运算符,将时间戳转换为 uint64_t。 Conversion operator to uint64_t. | |
Duration | operator- (const MicrosecondTimestamp &old_microsecond) const |
计算两个时间戳之间的时间差。 Computes the time difference between two timestamps. | |
MicrosecondTimestamp & | operator= (const MicrosecondTimestamp &other) |
赋值运算符重载。 Assignment operator overload. | |
Private Attributes | |
uint64_t | microsecond_ |
以微秒存储的时间戳。Timestamp stored in microseconds. | |
表示微秒级时间戳的类。Class representing a timestamp in microseconds.
Definition at line 18 of file libxr_time.hpp.
MicrosecondTimestamp::MicrosecondTimestamp | ( | ) |
默认构造函数,初始化时间戳为 0。 Default constructor initializing the timestamp to 0.
Definition at line 8 of file libxr_time.cpp.
MicrosecondTimestamp::MicrosecondTimestamp | ( | uint64_t | microsecond | ) |
以给定的微秒值构造时间戳。 Constructor initializing the timestamp with a given microsecond value.
microsecond | 以微秒表示的时间值。Time value in microseconds. |
Definition at line 10 of file libxr_time.cpp.
MicrosecondTimestamp::operator uint64_t | ( | ) | const |
转换运算符,将时间戳转换为 uint64_t。 Conversion operator to uint64_t.
Definition at line 15 of file libxr_time.cpp.
MicrosecondTimestamp::Duration MicrosecondTimestamp::operator- | ( | const MicrosecondTimestamp & | old_microsecond | ) | const |
计算两个时间戳之间的时间差。 Computes the time difference between two timestamps.
old_microsecond | 旧的时间戳。The older timestamp. |
Definition at line 41 of file libxr_time.cpp.
MicrosecondTimestamp & MicrosecondTimestamp::operator= | ( | const MicrosecondTimestamp & | other | ) |
赋值运算符重载。 Assignment operator overload.
other | 另一个 MicrosecondTimestamp 对象。Another MicrosecondTimestamp object. |
Definition at line 60 of file libxr_time.cpp.
|
private |
以微秒存储的时间戳。Timestamp stored in microseconds.
Definition at line 105 of file libxr_time.hpp.