A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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...
 

Friends

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 961 of file nstime.h.

Constructor & Destructor Documentation

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 970 of file nstime.h.

Friends And Related Function Documentation

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

Output streamer.

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

Definition at line 401 of file time.cc.

Member Data Documentation

Time ns3::TimeWithUnit::m_time
private

The time.

Definition at line 973 of file nstime.h.

Referenced by ns3::operator<<().

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

The unit to use in output.

Definition at line 977 of file nstime.h.

Referenced by ns3::operator<<().


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