Public Member Functions | Static Public Member Functions

ns3::TimeUnit< 1 > Class Template Reference

List of all members.

Public Member Functions

 TimeUnit (const std::string &s)
 String constructor Construct TimeUnit<1> object from common time expressions like " 1ms" or "10s". Supported units include:

  • s (seconds)
  • ms (milliseconds)
  • us (microseconds)
  • ns (nanoseconds)
  • ps (picoseconds)
  • fs (femtoseconds).

double GetSeconds (void) const
int64_t GetMilliSeconds (void) const
int64_t GetMicroSeconds (void) const
int64_t GetNanoSeconds (void) const
int64_t GetPicoSeconds (void) const
int64_t GetFemtoSeconds (void) const
int64_t GetTimeStep (void) const
 TimeUnit (TimeUnit const &o)
TimeUnit operator= (TimeUnit const &o)
 TimeUnit (HighPrecision data)
bool IsZero (void) const
bool IsNegative (void) const
bool IsPositive (void) const
bool IsStrictlyNegative (void) const
bool IsStrictlyPositive (void) const
HighPrecision const & GetHighPrecision (void) const
HighPrecision * PeekHighPrecision (void)

Static Public Member Functions

static uint64_t UnitsToTimestep (uint64_t unitValue, uint64_t unitFactor)

template<>
class ns3::TimeUnit< 1 >


Constructor & Destructor Documentation

ns3::TimeUnit< 1 >::TimeUnit ( const std::string &  s  ) 

String constructor Construct TimeUnit<1> object from common time expressions like " 1ms" or "10s". Supported units include:

  • s (seconds)
  • ms (milliseconds)
  • us (microseconds)
  • ns (nanoseconds)
  • ps (picoseconds)
  • fs (femtoseconds).

There can be no white space between the numerical portion and the units. Any otherwise malformed string causes a fatal error to occur.

Parameters:
s The string to parse into a TimeUnit<1>

Member Function Documentation

int64_t ns3::TimeUnit< 1 >::GetFemtoSeconds ( void   )  const
Returns:
an approximation in femtoseconds of the time stored in this instance.
int64_t ns3::TimeUnit< 1 >::GetMicroSeconds ( void   )  const
Returns:
an approximation in microseconds of the time stored in this instance.
int64_t ns3::TimeUnit< 1 >::GetMilliSeconds ( void   )  const
Returns:
an approximation in milliseconds of the time stored in this instance.
int64_t ns3::TimeUnit< 1 >::GetNanoSeconds ( void   )  const
Returns:
an approximation in nanoseconds of the time stored in this instance.
int64_t ns3::TimeUnit< 1 >::GetPicoSeconds ( void   )  const
Returns:
an approximation in picoseconds of the time stored in this instance.
double ns3::TimeUnit< 1 >::GetSeconds ( void   )  const
Returns:
an approximation in seconds of the time stored in this instance.
int64_t ns3::TimeUnit< 1 >::GetTimeStep ( void   )  const
Returns:
an approximation of the time stored in this instance in the units specified in m_tsPrecision.

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