A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::anonymous_namespace{time.cc} Namespace Reference

Unnamed namespace. More...

const int8_t UNIT_POWER [Time::LAST] = {17, 17, 17, 16, 15, 12, 9, 6, 3, 0}
 Scaling coefficients, exponents, and look up table for unit.
 
const int32_t UNIT_COEFF [Time::LAST] = {315360, 864, 36, 6, 1, 1, 1, 1, 1, 1}
 Scaling coefficient, relative to smallest unit.
 
const long doubleUNIT_VALUE = InitUnitValue()
 Value of each unit, in terms of the smallest defined unit.
 
long double Scale (Time::Unit u)
 Scale a unit to the smallest unit.
 
long doubleInitUnitValue ()
 Initializer for UNIT_VALUE.
 

Detailed Description

Unnamed namespace.

Function Documentation

◆ InitUnitValue()

long double * ns3::anonymous_namespace{time.cc}::InitUnitValue ( )

Initializer for UNIT_VALUE.

Returns
The array of scale factors between units.

Definition at line 70 of file time.cc.

References InitUnitValue(), ns3::Time::LAST, Scale(), and ns3::Time::Y.

Referenced by InitUnitValue().

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

◆ Scale()

long double ns3::anonymous_namespace{time.cc}::Scale ( Time::Unit  u)

Scale a unit to the smallest unit.

Parameters
uThe unit to scale
Returns
The value of u in terms of the smallest defined unit.

Definition at line 60 of file time.cc.

References Scale(), UNIT_COEFF, and UNIT_POWER.

Referenced by InitUnitValue(), and Scale().

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

Variable Documentation

◆ UNIT_COEFF

const int32_t ns3::anonymous_namespace{time.cc}::UNIT_COEFF[Time::LAST] = {315360, 864, 36, 6, 1, 1, 1, 1, 1, 1}

Scaling coefficient, relative to smallest unit.

Definition at line 52 of file time.cc.

Referenced by Scale().

◆ UNIT_POWER

const int8_t ns3::anonymous_namespace{time.cc}::UNIT_POWER[Time::LAST] = {17, 17, 17, 16, 15, 12, 9, 6, 3, 0}

Scaling coefficients, exponents, and look up table for unit.

Scaling exponent, relative to smallest unit.

Definition at line 50 of file time.cc.

Referenced by Scale().

◆ UNIT_VALUE

const long double* ns3::anonymous_namespace{time.cc}::UNIT_VALUE = InitUnitValue()

Value of each unit, in terms of the smallest defined unit.

Definition at line 81 of file time.cc.