Utility class to record the difference between two wall-clock times. More...
#include "system-wall-clock-timestamp.h"
Public Member Functions | |
SystemWallClockTimestamp (void) | |
Constructor. More... | |
std::time_t | GetInterval (void) const |
Get the last recorded interval. More... | |
std::time_t | GetLast (void) const |
Get the last recorded raw value. More... | |
void | Stamp (void) |
Record the current wall-clock time and delta since the last stamp(). More... | |
std::string | ToString (void) const |
Get the last time stamp as a string. More... | |
Private Attributes | |
std::time_t | m_diff |
Difference between the two previous time stamps. More... | |
std::time_t | m_last |
The last time stamp. More... | |
Utility class to record the difference between two wall-clock times.
Definition at line 39 of file system-wall-clock-timestamp.h.
ns3::SystemWallClockTimestamp::SystemWallClockTimestamp | ( | void | ) |
Constructor.
Definition at line 31 of file system-wall-clock-timestamp.cc.
References Stamp().
std::time_t ns3::SystemWallClockTimestamp::GetInterval | ( | void | ) | const |
Get the last recorded interval.
Definition at line 61 of file system-wall-clock-timestamp.cc.
References m_diff.
Referenced by ns3::ShowProgress::Stop().
std::time_t ns3::SystemWallClockTimestamp::GetLast | ( | void | ) | const |
Get the last recorded raw value.
Definition at line 55 of file system-wall-clock-timestamp.cc.
References m_last.
void ns3::SystemWallClockTimestamp::Stamp | ( | void | ) |
Record the current wall-clock time and delta since the last stamp().
Definition at line 39 of file system-wall-clock-timestamp.cc.
References m_diff, and m_last.
Referenced by SystemWallClockTimestamp(), ns3::ShowProgress::Start(), and ns3::ShowProgress::Stop().
std::string ns3::SystemWallClockTimestamp::ToString | ( | void | ) | const |
Get the last time stamp as a string.
Definition at line 47 of file system-wall-clock-timestamp.cc.
References m_last.
Referenced by ns3::ShowProgress::Start(), and ns3::ShowProgress::Stop().
|
private |
Difference between the two previous time stamps.
Definition at line 72 of file system-wall-clock-timestamp.h.
Referenced by GetInterval(), and Stamp().
|
private |
The last time stamp.
Definition at line 69 of file system-wall-clock-timestamp.h.
Referenced by GetLast(), Stamp(), and ToString().