A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::SystemWallClockTimestamp Class Reference

Utility class to record the difference between two wall-clock times. More...

#include "system-wall-clock-timestamp.h"

+ Collaboration diagram for ns3::SystemWallClockTimestamp:

Public Member Functions

 SystemWallClockTimestamp ()
 Constructor.
 
std::time_t GetInterval () const
 Get the last recorded interval.
 
std::time_t GetLast () const
 Get the last recorded raw value.
 
void Stamp ()
 Record the current wall-clock time and delta since the last stamp().
 
std::string ToString () const
 Get the last time stamp as a string.
 

Private Attributes

std::time_t m_diff
 Difference between the two previous time stamps.
 
std::time_t m_last
 The last time stamp.
 

Detailed Description

Utility class to record the difference between two wall-clock times.

Definition at line 38 of file system-wall-clock-timestamp.h.

Constructor & Destructor Documentation

◆ SystemWallClockTimestamp()

ns3::SystemWallClockTimestamp::SystemWallClockTimestamp ( )

Constructor.

Definition at line 31 of file system-wall-clock-timestamp.cc.

References Stamp().

+ Here is the call graph for this function:

Member Function Documentation

◆ GetInterval()

std::time_t ns3::SystemWallClockTimestamp::GetInterval ( ) const

Get the last recorded interval.

Returns
The interval between the last two time stamps.

Definition at line 61 of file system-wall-clock-timestamp.cc.

References m_diff.

Referenced by ns3::ShowProgress::Stop().

+ Here is the caller graph for this function:

◆ GetLast()

std::time_t ns3::SystemWallClockTimestamp::GetLast ( ) const

Get the last recorded raw value.

Returns
The last time stamp recorded.

Definition at line 55 of file system-wall-clock-timestamp.cc.

References m_last.

◆ Stamp()

void ns3::SystemWallClockTimestamp::Stamp ( )

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().

+ Here is the caller graph for this function:

◆ ToString()

std::string ns3::SystemWallClockTimestamp::ToString ( ) const

Get the last time stamp as a string.

Returns
The last time stamp.

Definition at line 47 of file system-wall-clock-timestamp.cc.

References m_last.

Referenced by ns3::ShowProgress::Start(), and ns3::ShowProgress::Stop().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_diff

std::time_t ns3::SystemWallClockTimestamp::m_diff
private

Difference between the two previous time stamps.

Definition at line 70 of file system-wall-clock-timestamp.h.

Referenced by GetInterval(), and Stamp().

◆ m_last

std::time_t ns3::SystemWallClockTimestamp::m_last
private

The last time stamp.

Definition at line 67 of file system-wall-clock-timestamp.h.

Referenced by GetLast(), Stamp(), and ToString().


The documentation for this class was generated from the following files: