ARC SDK
|
A Period represents a length of time. More...
#include <arc/DateTime.h>
Public Member Functions | |
Period () | |
Default constructor. The period is set to 0 length. | |
Period (time_t) | |
Constructor that takes a time_t variable and stores it. | |
Period (time_t seconds, uint32_t nanoseconds) | |
Constructor that takes seconds and nanoseconds and stores them. | |
Period (const std::string &, PeriodBase base=PeriodSeconds) | |
Constructor that tries to convert a string. | |
Period & | operator= (time_t) |
Assignment operator from a time_t. | |
Period & | operator= (const Period &) |
Assignment operator from a Period. | |
void | SetPeriod (time_t sec) |
Sets the period in seconds. | |
void | SetPeriod (time_t sec, uint32_t nanosec) |
Sets the period in seconds and nanoseconds. | |
time_t | GetPeriod () const |
Gets the period in seconds. | |
time_t | GetPeriodNanoseconds () const |
Gets the number of nanoseconds after the last whole second. | |
const sigc::slot< const char * > * | istr () const |
For use with IString. | |
operator std::string () const | |
Returns a string representation of the period. | |
bool | operator< (const Period &) const |
Comparing two Period objects. | |
bool | operator> (const Period &) const |
Comparing two Period objects. | |
bool | operator<= (const Period &) const |
Comparing two Period objects. | |
bool | operator>= (const Period &) const |
Comparing two Period objects. | |
bool | operator== (const Period &) const |
Comparing two Period objects. | |
bool | operator!= (const Period &) const |
Comparing two Period objects. | |
A Period represents a length of time.
Period represents a length of time (eg 2 mins and 30.1 seconds), whereas Time represents a moment of time (eg midnight on 1st Jan 2000).