A Discrete-Event Network Simulator
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. More...

Private Attributes

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


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

Detailed Description

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

Definition at line 1352 of file nstime.h.

Constructor & Destructor Documentation

◆ TimeWithUnit()

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

Attach a unit to a Time.

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

Definition at line 1361 of file nstime.h.

Friends And Related Function Documentation

◆ operator<<

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

Output streamer.

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

Definition at line 432 of file time.cc.

Member Data Documentation

◆ m_time

Time ns3::TimeWithUnit::m_time

The time.

Definition at line 1367 of file nstime.h.

◆ m_unit

Time::Unit ns3::TimeWithUnit::m_unit

The unit to use in output.

Definition at line 1368 of file nstime.h.

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