libxr  1.0
Want to be the best embedded framework
Loading...
Searching...
No Matches
LibXR::MicrosecondTimestamp::Duration Class Reference

表示微秒级时间差的类。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.
 

Detailed Description

表示微秒级时间差的类。Class representing a time difference in microseconds.

Definition at line 44 of file libxr_time.hpp.

Constructor & Destructor Documentation

◆ Duration()

MicrosecondTimestamp::Duration::Duration ( uint64_t diff)

构造函数,初始化时间差。 Constructor initializing the time difference.

Parameters
diff以微秒表示的时间差。Time difference in microseconds.

Definition at line 17 of file libxr_time.cpp.

17: diff_(diff) {}
uint64_t diff_
存储时间差(微秒)。Time difference stored in microseconds.

Field Documentation

◆ diff_

uint64_t LibXR::MicrosecondTimestamp::Duration::diff_
private

存储时间差(微秒)。Time difference stored in microseconds.

Definition at line 85 of file libxr_time.hpp.


The documentation for this class was generated from the following files: