Class representing a period of time defined via a begin time and an end time. More...
#include "time-span.h"
Public Member Functions | |
| TimeSpan ()=default | |
| TimeSpan (const std::string &s) | |
| Construct a TimeSpan from a string. | |
| TimeSpan (const Time &begin, const Time &end) | |
| Construct a TimeSpan from a begin time and an end time. | |
| Time | Begin () const |
| Time | Duration () const |
| Time | End () const |
| bool | operator== (const TimeSpan &other) const =default |
| Compare two TimeSpan objects for equality. | |
Static Public Member Functions | |
| static TimeSpan | Create (const Time &begin, const Time &end) |
| TimeSpan factory (required by TimeSpanValue). | |
Private Attributes | |
| Time | m_begin |
| begin time | |
| Time | m_end |
| end time | |
Class representing a period of time defined via a begin time and an end time.
An object of this class can also be set/get via the attribute system by using the TimeSpanValue attribute value.
Definition at line 29 of file time-span.h.
|
default |
References TimeSpan().
Referenced by TimeSpan(), Create(), and operator==().
|
explicit |
Construct a TimeSpan from a string.
The string representation is "{begin, end}". Whitespace around the begin and end times is allowed.
| s | The string to parse into a TimeSpan |
Definition at line 22 of file time-span.cc.
Construct a TimeSpan from a begin time and an end time.
| begin | the begin time |
| end | the end time |
Definition at line 28 of file time-span.cc.
References m_begin, m_end, and NS_ASSERT_MSG.
| Time ns3::TimeSpan::Begin | ( | ) | const |
Definition at line 44 of file time-span.cc.
References m_begin.
Referenced by TimeInputOutputTestCase::DoRun(), and ns3::operator<<().
TimeSpan factory (required by TimeSpanValue).
| begin | the begin time |
| end | the end time |
Definition at line 38 of file time-span.cc.
References TimeSpan().
| Time ns3::TimeSpan::Duration | ( | ) | const |
Definition at line 56 of file time-span.cc.
| Time ns3::TimeSpan::End | ( | ) | const |
Definition at line 50 of file time-span.cc.
References m_end.
Referenced by TimeInputOutputTestCase::DoRun(), and ns3::operator<<().
|
default |
Compare two TimeSpan objects for equality.
| other | The TimeSpan to compare with |
References TimeSpan().
|
private |
begin time
Definition at line 84 of file time-span.h.
Referenced by TimeSpan(), Begin(), and Duration().
|
private |
end time
Definition at line 85 of file time-span.h.
Referenced by TimeSpan(), Duration(), and End().