Cyclone ISO C++ API Reference Guide
|
#include "Duration.hpp"
Public Member Functions | |
Duration () | |
Duration (int32_t sec, uint32_t nanosec=0) | |
int | compare (const Duration &that) const |
uint32_t | nanosec () const |
void | nanosec (uint32_t ns) |
bool | operator!= (const Duration &that) const |
Duration & | operator*= (uint64_t factor) |
const Duration | operator+ (const Duration &other) const |
Duration & | operator+= (const Duration &a_ti) |
const Duration | operator- (const Duration &other) const |
Duration & | operator-= (const Duration &a_ti) |
bool | operator< (const Duration &that) const |
bool | operator<= (const Duration &that) const |
bool | operator== (const Duration &that) const |
bool | operator> (const Duration &that) const |
bool | operator>= (const Duration &that) const |
int64_t | sec () const |
void | sec (int64_t s) |
int64_t | to_microsecs () const |
int64_t | to_millisecs () const |
double | to_secs () const |
Static Public Member Functions | |
static const Duration | from_microsecs (int64_t microseconds) |
static const Duration | from_millisecs (int64_t milliseconds) |
static const Duration | from_secs (double seconds) |
static const Duration | infinite () |
static const Duration | zero () |
Duration represents a time interval and can -
Definition at line 42 of file Duration.hpp.
dds::core::Duration::Duration | ( | ) |
Create a Duration elapsing the default amount of time (zero seconds).
|
explicit |
int dds::core::Duration::compare | ( | const Duration & | that | ) | const |
|
static |
Create a Duration from a number of microseconds
microseconds | number of microseconds |
|
static |
Create a Duration from a number of milliseconds
miliseconds | number of milliseconds |
|
static |
Create a Duration from a number of seconds
seconds | number of seconds |
uint32_t dds::core::Duration::nanosec | ( | ) | const |
Get nanoseconds part of the Duration.
void dds::core::Duration::nanosec | ( | uint32_t | ns | ) |
Set number of nanoseconds
ns | number of nanoseconds |
bool dds::core::Duration::operator!= | ( | const Duration & | that | ) | const |
Duration& dds::core::Duration::operator*= | ( | uint64_t | factor | ) |
bool dds::core::Duration::operator< | ( | const Duration & | that | ) | const |
bool dds::core::Duration::operator<= | ( | const Duration & | that | ) | const |
bool dds::core::Duration::operator== | ( | const Duration & | that | ) | const |
bool dds::core::Duration::operator> | ( | const Duration & | that | ) | const |
bool dds::core::Duration::operator>= | ( | const Duration & | that | ) | const |
int64_t dds::core::Duration::sec | ( | ) | const |
Get seconds part of the Duration.
void dds::core::Duration::sec | ( | int64_t | s | ) |
Set number of seconds
s | number of seconds |
int64_t dds::core::Duration::to_microsecs | ( | ) | const |
Returns this Duration in micro-seconds.
int64_t dds::core::Duration::to_millisecs | ( | ) | const |
Returns this Duration in milliseconds.
double dds::core::Duration::to_secs | ( | ) | const |
Returns this Duration in seconds.