FastArduino v1.10
C++ library to build fast but small Arduino/AVR projects
|
Structure used to hold a time value with microsecond precision. More...
#include <fastarduino/time.h>
Public Member Functions | |
RTTTime (uint32_t micros=0UL) | |
Construct a new RTTTime value. More... | |
RTTTime (uint32_t millis, uint16_t micros) | |
Construct a new RTTTime value. More... | |
RTTTime (const RTTTime &that) | |
Construct a copy of that . More... | |
RTTTime & | operator= (const RTTTime &that) |
Assign this RTTTime instance from that . More... | |
RTTTime & | operator+= (uint32_t microseconds) |
Add microseconds to this RTTTime instance. More... | |
RTTTime & | operator-= (uint32_t microseconds) |
Remove microseconds from this RTTTime instance. More... | |
uint32_t | total_micros () const |
Return current elapsed time in microseconds only. More... | |
uint32_t | millis () const |
Number of elapsed milliseconds. More... | |
uint16_t | micros () const |
Number of elapsed microseconds (0..999). More... | |
Structure used to hold a time value with microsecond precision.
Note that this value is not absolute but relative to some time base, not defined here, but depending on the API producing or consuming an RTTTime
.
millis | number of milliseconds elapsed since some predefined time base |
micros | number of microseconds, added to millis , elapsed since some predefined time base reference, between 0 and 999 ; setting a greater value is not supported and will have an undefined behavior of the API consuming such an RTTTime instance. |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
|
inline |
Remove microseconds
from this RTTTime instance.
microseconds | the number of us to subtract from this RTTTime; results are undetermined if microseconds is larger than total_micros() . |
|
inline |
|
inline |
|
inline |