A Discrete-Event Network Simulator
API
ns3::SystemWallClockMs Class Reference

Measure elapsed wall clock time in milliseconds. More...

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

+ Collaboration diagram for ns3::SystemWallClockMs:

Public Member Functions

 SystemWallClockMs ()
 
 ~SystemWallClockMs ()
 
int64_t End (void)
 Stop measuring the time since Start() was called. More...
 
int64_t GetElapsedReal (void) const
 
int64_t GetElapsedSystem (void) const
 
int64_t GetElapsedUser (void) const
 
void Start (void)
 Start a measure. More...
 

Private Attributes

class SystemWallClockMsPrivatem_priv
 The implementation. More...
 

Detailed Description

Measure elapsed wall clock time in milliseconds.

Definition at line 53 of file system-wall-clock-ms.h.

Constructor & Destructor Documentation

◆ SystemWallClockMs()

ns3::SystemWallClockMs::SystemWallClockMs ( )

Definition at line 134 of file system-wall-clock-ms.cc.

References NS_LOG_FUNCTION.

◆ ~SystemWallClockMs()

ns3::SystemWallClockMs::~SystemWallClockMs ( )

Definition at line 140 of file system-wall-clock-ms.cc.

References m_priv, and NS_LOG_FUNCTION.

Member Function Documentation

◆ End()

int64_t ns3::SystemWallClockMs::End ( void  )

Stop measuring the time since Start() was called.

Returns
the measured elapsed wall clock time (in milliseconds) since Start() was invoked.

It is possible to start a new measurement with Start() after this method returns.

Returns int64_t to avoid dependency on clock_t in ns-3 code.

Definition at line 155 of file system-wall-clock-ms.cc.

References ns3::SystemWallClockMsPrivate::End(), m_priv, and NS_LOG_FUNCTION.

Referenced by ns3::ShowProgress::CheckProgress(), Bench::RunBench(), and runBenchOneIteration().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetElapsedReal()

int64_t ns3::SystemWallClockMs::GetElapsedReal ( void  ) const
Returns
the measured elapsed wall clock time (in milliseconds) since Start() was invoked.

Returns int64_t to avoid dependency on clock_t in ns-3 code.

Definition at line 162 of file system-wall-clock-ms.cc.

References ns3::SystemWallClockMsPrivate::GetElapsedReal(), m_priv, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ GetElapsedSystem()

int64_t ns3::SystemWallClockMs::GetElapsedSystem ( void  ) const
Returns
the measured elapsed 'system' wall clock time (in milliseconds) since Start() was invoked.

Returns int64_t to avoid dependency on clock_t in ns-3 code.

Definition at line 176 of file system-wall-clock-ms.cc.

References ns3::SystemWallClockMsPrivate::GetElapsedSystem(), m_priv, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ GetElapsedUser()

int64_t ns3::SystemWallClockMs::GetElapsedUser ( void  ) const
Returns
the measured elapsed 'user' wall clock time (in milliseconds) since Start() was invoked.

Returns int64_t to avoid dependency on clock_t in ns-3 code.

Definition at line 169 of file system-wall-clock-ms.cc.

References ns3::SystemWallClockMsPrivate::GetElapsedUser(), m_priv, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ Start()

void ns3::SystemWallClockMs::Start ( void  )

Start a measure.

Definition at line 148 of file system-wall-clock-ms.cc.

References m_priv, NS_LOG_FUNCTION, and ns3::SystemWallClockMsPrivate::Start().

Referenced by ns3::TestCase::Run(), Bench::RunBench(), runBenchOneIteration(), and ns3::ShowProgress::ScheduleCheckProgress().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_priv

class SystemWallClockMsPrivate* ns3::SystemWallClockMs::m_priv
private

The implementation.

Definition at line 98 of file system-wall-clock-ms.h.

Referenced by ~SystemWallClockMs(), End(), GetElapsedReal(), GetElapsedSystem(), GetElapsedUser(), and Start().


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