|
SNMP++
3.3.4
|
Time handling... More...
#include <msec.h>

Public Member Functions | |
| msec () | |
| Constructor, sets the time to the current system time. More... | |
| msec (const msec &in_msec) | |
| Constructor using another msec object. More... | |
| msec (const int sec, const int milsec) | |
| Constructor using seconds and milli sconds. More... | |
| msec & | operator-= (const long millisec) |
| msec & | operator-= (const timeval &t1) |
| msec & | operator+= (const long millisec) |
| msec & | operator+= (const timeval &t1) |
| msec & | operator= (const msec &t) |
| msec & | operator= (const timeval &t1) |
| operator unsigned long () const | |
| Use as an unsigned long. More... | |
| void | refresh () |
| Set the time to the current system time. More... | |
| void | SetInfinite () |
| Set the object out into the future as far as possible. More... | |
| int | IsInfinite () const |
| Check if the time is infinite. More... | |
| void | GetDelta (const msec &future, timeval &timeout) const |
| Get the difference between this and the given time. More... | |
| void | GetDeltaFromNow (timeval &timeout) const |
| Get the difference between this object and the current system time. More... | |
| const char * | get_printable () const |
| Return the time as printable string. More... | |
Private Attributes | |
| timeval | m_time |
| SNMP_PP_MUTABLE char | m_output_buffer [MSECOUTBUF] |
| SNMP_PP_MUTABLE bool | m_changed |
Static Private Attributes | |
| static SnmpSynchronized | m_localtime_mutex |
Friends | |
| DLLOPT friend int | operator== (const msec &t1, const msec &t2) |
| DLLOPT friend int | operator!= (const msec &t1, const msec &t2) |
| DLLOPT friend int | operator< (const msec &t1, const msec &t2) |
| DLLOPT friend int | operator> (const msec &t1, const msec &t2) |
| DLLOPT friend int | operator<= (const msec &t1, const msec &t2) |
| DLLOPT friend int | operator>= (const msec &t1, const msec &t2) |
|
inline |
|
inline |
|
inline |
| const char* msec::get_printable | ( | ) | const |
Return the time as printable string.
| void msec::GetDelta | ( | const msec & | future, |
| timeval & | timeout | ||
| ) | const |
Get the difference between this and the given time.
If future is before this objects time, "timeout" will be set to zero.
| future | - Time to compare to |
| timeout | - Will be filled with the difference |
Referenced by GetDeltaFromNow().
|
inline |
Get the difference between this object and the current system time.
If the system time is before this objects time, "timeout" will be set to zero.
| timeout | - Will be filled with the difference |
Definition at line 163 of file msec.h.
References GetDelta().
|
inline |
|
inline |
| msec& msec::operator+= | ( | const long | millisec | ) |
| msec& msec::operator+= | ( | const timeval & | t1 | ) |
| msec& msec::operator-= | ( | const long | millisec | ) |
| msec& msec::operator-= | ( | const timeval & | t1 | ) |
| msec& msec::operator= | ( | const timeval & | t1 | ) |
| void msec::refresh | ( | ) |
Set the time to the current system time.
|
inline |
|
private |
|
staticprivate |
|
private |
|
private |
Definition at line 172 of file msec.h.
Referenced by operator=().