|
Jafar
|
A toolbox for time management (absolute and duration). More...
A toolbox for time management (absolute and duration).
Converts from/in different other time structures such as timeval, double, xtime and provides sleep functions.
#include <ctime.hpp>
Public Types | |
| typedef time_t | sec_t |
| typedef suseconds_t | usec_t |
Public Member Functions | |
| time (sec_t sec=0, usec_t usec=0) | |
| Initializes the time at (0, 0) | |
| time (double d) | |
| Initializes with a double (in sec) | |
| time (timeval const &t) | |
| Initializes the time using the given time structure We assume that t is already well-formed (i.e. | |
| bool | is_normal () const |
| bool | is_infty () const |
| bool | is_null () const |
| time_t | s () const |
| time_t | ms () const |
| time_t | us () const |
| timeval | to_timeval () const |
| timespec | to_timespec () const |
| double | to_double () const |
| boost::xtime | to_xtime () const |
| void | sleep_period () const |
| void | sleep_until () const |
| bool | check_close (time const &other, time const &epsilon) const |
| bool | operator> (const time &t) const |
| bool | operator>= (const time &t) const |
| bool | operator< (const time &t) const |
| bool | operator<= (const time &t) const |
| bool | operator== (const time &t) const |
| bool | operator!= (const time &t) const |
| time | operator- (const time &other) const |
| time | operator+ (const time &other) const |
| time | operator/ (double divider) const |
| time | operator* (double multipl) const |
| void | operator= (const time &other) |
Static Public Member Functions | |
| static time | infty () |
| A special time object handled as "infty". | |
| static time | null () |
| static time | current () |
| static time | from_ms (int msecs) |
| Get a time object from a milliseconds count. | |
| static time | from_us (int usecs) |
Static Public Attributes | |
| static const int | UsecPerSec = 1000000 |
Private Types | |
| enum | Type { Normal, Infty } |
Private Member Functions | |
| time (Type mode) | |
| void | assign (sec_t sec, usec_t usec) |
| int | compare (time const &other) const |
Private Attributes | |
| Type | m_type |
| sec_t | m_sec |
| usec_t | m_usec |
Friends | |
| std::istream & | operator>> (std::istream &stream, time &t) |
| std::ostream & | operator<< (std::ostream &stream, const time &t) |
| jafar::ddf::time::time | ( | timeval const & | t | ) | [inline, explicit] |
| static time jafar::ddf::time::infty | ( | ) | [inline, static] |
A special time object handled as "infty".
Definition at line 81 of file ctime.hpp.
Referenced by jafar::ddf::SensorNodeGeneric< PARAMS >::PurgeFifo().
| Generated on Wed Oct 15 2014 00:37:33 for Jafar by doxygen 1.7.6.1 |
|