#include <Time.h>
Definition at line 27 of file Time.h.
Public Member Functions | |
| Time (u_int32_t sec=0, u_int32_t usec=0) | |
| void | get_time () |
| Get the time into the structure. | |
| double | in_seconds () |
| |
| u_int32_t | in_microseconds () |
| |
| u_int32_t | in_milliseconds () |
| |
| u_int32_t | elapsed_ms () |
| |
| void | cleanup () |
| Cleanup the usec field wrt. sec. | |
| Time | operator+ (const Time &t) const |
| Standard operators. | |
| Time | operator- (const Time &t) const |
| Standard operators. | |
| Time & | operator+= (const Time &t) |
| Standard operators. | |
| Time & | operator-= (const Time &t) |
| Standard operators. | |
| bool | operator== (const Time &t) const |
| Standard operators. | |
| bool | operator< (const Time &t) const |
| Standard operators. | |
| bool | operator> (const Time &t) const |
| Standard operators. | |
| bool | operator>= (const Time &t) const |
| Standard operators. | |
| bool | operator<= (const Time &t) const |
| Standard operators. | |
Public Attributes | |
| u_int32_t | sec_ |
| u_int32_t | usec_ |
| oasys::Time::Time | ( | u_int32_t | sec = 0, |
|
| u_int32_t | usec = 0 | |||
| ) | [inline] |
| void oasys::Time::get_time | ( | ) |
Get the time into the structure.
Definition at line 34 of file Time.cc.
References cleanup(), dtnsim::gettimeofday(), sec_, and usec_.
Referenced by elapsed_ms(), oasys::TokenBucket::empty(), dtn::ProphetAckList::expire(), dtn::ProphetEncounter::handle_bad_protocol(), dtn::ProphetEncounter::handle_poll_timeout(), dtn::ProphetEncounter::handle_prophet_tlv(), dtn::ProphetEncounter::ProphetEncounter(), dtn::ProphetNode::ProphetNode(), dtntunnel::TCPTunnel::Connection::run(), dtn::ProphetEncounter::run(), dtn::BundleDaemon::run(), dtn::ProphetEncounter::send_prophet_tlv(), dtn::ProphetNode::set_age_now(), oasys::TokenBucket::TokenBucket(), oasys::TokenBucket::update(), and dtn::ProphetNode::update_age().
| double oasys::Time::in_seconds | ( | ) |
| u_int32_t oasys::Time::in_microseconds | ( | ) |
| u_int32_t oasys::Time::in_milliseconds | ( | ) |
| u_int32_t oasys::Time::elapsed_ms | ( | ) |
Definition at line 97 of file Time.cc.
References get_time(), and in_milliseconds().
Referenced by dtn::BundleDaemon::run().
| void oasys::Time::cleanup | ( | ) |
Cleanup the usec field wrt. sec.
Definition at line 186 of file Time.cc.
Referenced by get_time(), operator+=(), and Time().
| u_int32_t oasys::Time::sec_ |
Definition at line 28 of file Time.h.
Referenced by cleanup(), dtn::ProphetAckList::expire(), get_time(), in_microseconds(), in_milliseconds(), in_seconds(), operator+(), operator+=(), operator-=(), operator<(), dtn::ProphetNode::operator=(), operator==(), operator>(), dtntunnel::TCPTunnel::Connection::run(), dtn::ProphetNode::set_age(), and dtn::ProphetNode::time_to_units().
| u_int32_t oasys::Time::usec_ |
Definition at line 29 of file Time.h.
Referenced by cleanup(), get_time(), in_microseconds(), in_milliseconds(), in_seconds(), operator+(), operator+=(), operator-=(), operator<(), dtn::ProphetNode::operator=(), operator==(), operator>(), dtntunnel::TCPTunnel::Connection::run(), dtn::ProphetNode::set_age(), and dtn::ProphetNode::time_to_units().
1.5.1