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

A Time with attached unit, to facilitate output in that unit. More...

#include "nstime.h"

+ Collaboration diagram for ns3::TimeWithUnit:

Public Member Functions

 TimeWithUnit (const Time time, const Time::Unit unit)
 Attach a unit to a Time.
 

Private Attributes

Time m_time
 The time.
 
Time::Unit m_unit
 The unit to use in output.
 

Friends

std::ostream & operator<< (std::ostream &os, const TimeWithUnit &timeU)
 Output streamer.
 

Detailed Description

A Time with attached unit, to facilitate output in that unit.

Definition at line 1474 of file nstime.h.

Constructor & Destructor Documentation

◆ TimeWithUnit()

ns3::TimeWithUnit::TimeWithUnit ( const Time time,
const Time::Unit unit )
inline

Attach a unit to a Time.

Parameters
[in]timeThe time.
[in]unitThe unit to use for output

Definition at line 1483 of file nstime.h.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
const TimeWithUnit & timeU )
friend

Output streamer.

Parameters
[in,out]osThe stream.
[in]timeUThe Time with desired unit
Returns
The stream.

Definition at line 416 of file time.cc.

Member Data Documentation

◆ m_time

Time ns3::TimeWithUnit::m_time
private

The time.

Definition at line 1490 of file nstime.h.

◆ m_unit

Time::Unit ns3::TimeWithUnit::m_unit
private

The unit to use in output.

Definition at line 1491 of file nstime.h.


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