#include <rutz/time.h>
Public Member Functions | |
| time () throw () | |
| Construct with time=0. | |
| time (const timeval &t) throw () | |
| Construct from a timeval. | |
| time (unsigned long s, long us) throw () | |
| Construct with given seconds+microseconds values. | |
| time (double ss) throw () | |
| time (const time &x) throw () | |
| Copy construct. | |
| ~time () throw () | |
| Destruct. | |
| void | reset (unsigned long s=0, long us=0) throw () |
| Reset to given seconds+microseconds values. | |
| time & | operator= (const time &x) throw () |
| Assignment operator. | |
| time | operator+ (const time &t2) const throw () |
| Addition operator. | |
| time & | operator+= (const time &t2) throw () |
| In-place addition operator. | |
| time | operator- (const time &t2) const throw () |
| Subtraction operator. | |
| time & | operator-= (const time &t2) throw () |
| In-place subtraction operator. | |
| bool | operator< (const time &t2) const throw () |
| Less-than comparison. | |
| bool | operator<= (const time &t2) const throw () |
| Less-than-or-equal comparison. | |
| bool | operator== (const time &t2) const throw () |
| Equality comparison. | |
| bool | operator> (const time &t2) const throw () |
| Greater-than comparison. | |
| bool | operator>= (const time &t2) const throw () |
| Greater-than-or-equal comparison. | |
| double | sec () const throw () |
| Return time in floating-point seconds. | |
| double | msec () const throw () |
| Return time in floating-point milliseconds. | |
| double | usec () const throw () |
| Return time in floating-point microseconds. | |
| const timeval & | tval () const throw () |
| Return internal timeval. | |
| operator const timeval & () const throw () | |
| Conversion operator to timeval. | |
Static Public Member Functions | |
| static time | wall_clock_now () throw () |
| Create a time representing current wall-clock time. | |
| static time | user_rusage () throw () |
| Create a time representing the current process's user cpu usage. | |
| static time | sys_rusage () throw () |
| Create a time representing the current process's sys cpu usage. | |
| static time | rusage_now () throw () |
| Create a time representing the current process's total user+sys cpu usage. | |
All operations provide the no-throw guarantee.
Definition at line 50 of file time.h.