#include <TimeValue.h>
Inheritance diagram for TimeValue::
Public Methods | |
TimeValue () | |
Initialize time to zero. More... | |
TimeValue (const TimeValue &) | |
TimeValue (int, int) | |
Create a time value, initialized to the values passed in. More... | |
TimeValue | operator- (const TimeValue &) |
Subtract the value from this TimeValue and return the result. More... | |
TimeValue | operator+ (const TimeValue &) |
Add the value to this TimeValue and return the result. More... | |
TimeValue | operator * (double value) |
Mutiplies time by a double, results the result. More... | |
virtual | ~TimeValue () |
void | setToCurrentTime () |
Set this TimeValue to the current time, as returned by the particular system call for your OS. More... | |
timeval | getTimevalStruct () |
Return a timeval struct that is equivalent to the time stored in this object. More... | |
timespec | getTimespecStruct () |
Return a timespec struct that is equivalent to the value stored in this object. More... | |
bool | isZero () |
Return true if this value is zero. More... | |
long | getSeconds () |
Get the "seconds" portion of the time value. More... | |
long | getMilliseconds () |
Get the "milliseconds" portion of the time value. More... | |
long | getTotalMilliseconds () |
Get the time as a total number of milliseconds. More... | |
long | getMicroseconds () |
Get the "microseconds" portion of the time value. More... | |
void | setSeconds (long) |
Set the "seconds" portion of the time value. More... | |
void | setMilliseconds (long) |
Set the milliseconds portion of the time value. More... | |
void | setMicroseconds (long) |
virtual void | toStream (std::ostream &) |
Static Public Methods | |
TimeValue | getCurrentTime () |
Return the current time. More... | |
Private Methods | |
void | doCarry () |
Private Attributes | |
timeval | m_timeValue |
timespec | m_timeSpec |
Friends | |
bool | operator< (const TimeValue &value1, const TimeValue &value2) |
Definition at line 7 of file TimeValue.h.
|
Initialize time to zero.
Definition at line 12 of file TimeValue.cpp. |
|
Definition at line 18 of file TimeValue.cpp. |
|
Create a time value, initialized to the values passed in.
Definition at line 29 of file TimeValue.cpp. |
|
Definition at line 17 of file TimeValue.h. |
|
Definition at line 198 of file TimeValue.cpp. Referenced by TimeValue(), operator *(), operator+(), setMicroseconds(), and setMilliseconds().
|
|
Return the current time.
Definition at line 113 of file TimeValue.cpp. Referenced by Timer::addEvent(), NetworkLayer::handlePongPacket(), SendWindow::onAckRecvd(), TimerNode::past(), and Condition::timedWait().
|
|
Get the "microseconds" portion of the time value.
Definition at line 183 of file TimeValue.cpp. |
|
Get the "milliseconds" portion of the time value.
Definition at line 164 of file TimeValue.cpp. Referenced by getTotalMilliseconds().
|
|
Get the "seconds" portion of the time value.
Definition at line 155 of file TimeValue.cpp. Referenced by getTotalMilliseconds(), and SendWindow::onAckRecvd().
|
|
Return a timespec struct that is equivalent to the value stored in this object.
Definition at line 135 of file TimeValue.cpp. Referenced by Condition::timedWait(), and Timer::timerThreadImpl().
|
|
Return a timeval struct that is equivalent to the time stored in this object.
Definition at line 125 of file TimeValue.cpp. |
|
Get the time as a total number of milliseconds.
Definition at line 174 of file TimeValue.cpp. Referenced by SendWindow::reliableSend().
|
|
Return true if this value is zero.
Definition at line 146 of file TimeValue.cpp. Referenced by NetworkLayer::handlePongPacket().
|
|
Mutiplies time by a double, results the result.
Definition at line 70 of file TimeValue.cpp. |
|
Add the value to this TimeValue and return the result.
Definition at line 57 of file TimeValue.cpp. |
|
Subtract the value from this TimeValue and return the result. This does not modify the current object. Definition at line 41 of file TimeValue.cpp. |
|
Definition at line 215 of file TimeValue.cpp. |
|
Set the milliseconds portion of the time value.
Definition at line 208 of file TimeValue.cpp. Referenced by SendWindow::SendWindow().
|
|
Set the "seconds" portion of the time value.
Definition at line 192 of file TimeValue.cpp. |
|
Set this TimeValue to the current time, as returned by the particular system call for your OS.
Definition at line 95 of file TimeValue.cpp. Referenced by getCurrentTime(), NetworkLayer::ping(), and SendWindow::reliableSend().
|
|
Reimplemented from BasicObject. Definition at line 222 of file TimeValue.cpp. |
|
Definition at line 229 of file TimeValue.cpp. |
|
Definition at line 41 of file TimeValue.h. |
|
Definition at line 40 of file TimeValue.h. |