timeUnit Class Reference

#include <Time.h>

Public Types

enum  ostream_fmt { sparse, verbose }

Public Member Functions

COMMON_EXPORT timeUnit (fraction _ns_per_unit)
COMMON_EXPORT fraction get_ns_per_unit () const
COMMON_EXPORT fraction get_units_per_ns () const
COMMON_EXPORT void set_ns_per_unit (const fraction &nspu)
COMMON_EXPORT int64_t cvtTo_ns (double units) const
COMMON_EXPORT int64_t cvtTo_ns (int64_t units) const
COMMON_EXPORT double cvtFrom_nsD (int64_t ns) const
COMMON_EXPORT int64_t cvtFrom_nsI (int64_t ns) const

Static Public Member Functions

static COMMON_EXPORT const
timeUnit
ns ()
static COMMON_EXPORT const
timeUnit
us ()
static COMMON_EXPORT const
timeUnit
ms ()
static COMMON_EXPORT const
timeUnit
sec ()
static COMMON_EXPORT const
timeUnit
minute ()
static COMMON_EXPORT const
timeUnit
hour ()
static COMMON_EXPORT const
timeUnit
day ()
static COMMON_EXPORT const
timeUnit
year ()
static COMMON_EXPORT const
timeUnit
leapYear ()

Static Public Attributes

static ostream_fmt curFmt = timeUnit::sparse

Static Private Member Functions

static COMMON_EXPORT const
timeUnit
nsHelp ()
static COMMON_EXPORT const
timeUnit
usHelp ()
static COMMON_EXPORT const
timeUnit
msHelp ()
static COMMON_EXPORT const
timeUnit
secHelp ()
static COMMON_EXPORT const
timeUnit
minHelp ()
static COMMON_EXPORT const
timeUnit
hourHelp ()
static COMMON_EXPORT const
timeUnit
dayHelp ()
static COMMON_EXPORT const
timeUnit
yearHelp ()
static COMMON_EXPORT const
timeUnit
leapYearHelp ()

Private Attributes

fraction ns_per_unit
fraction units_per_ns

Static Private Attributes

static COMMON_EXPORT const
timeUnit
_leapYear = NULL
static COMMON_EXPORT const
timeUnit
_year = NULL
static COMMON_EXPORT const
timeUnit
_day = NULL
static COMMON_EXPORT const
timeUnit
_hour = NULL
static COMMON_EXPORT const
timeUnit
_minute = NULL
static COMMON_EXPORT const
timeUnit
_sec = NULL
static COMMON_EXPORT const
timeUnit
_ms = NULL
static COMMON_EXPORT const
timeUnit
_us = NULL
static COMMON_EXPORT const
timeUnit
_ns = NULL

Detailed Description

Definition at line 57 of file Time.h.


Member Enumeration Documentation

Enumerator:
sparse 
verbose 

Definition at line 90 of file Time.h.


Constructor & Destructor Documentation

timeUnit::timeUnit ( fraction  _ns_per_unit  ) 

Member Function Documentation

double timeUnit::cvtFrom_nsD ( int64_t  ns  )  const

Definition at line 124 of file Time.C.

References units_per_ns.

Referenced by timeLength::getD(), relTimeStamp::getD(), and timeStamp::getD().

int64_t timeUnit::cvtFrom_nsI ( int64_t  ns  )  const

Definition at line 128 of file Time.C.

References fraction::multReturnInt64(), and units_per_ns.

Referenced by timeLength::getI(), relTimeStamp::getI(), and timeStamp::getI().

int64_t timeUnit::cvtTo_ns ( int64_t  units  )  const

Definition at line 118 of file Time.C.

References fraction::multReturnInt64(), and ns_per_unit.

int64_t timeUnit::cvtTo_ns ( double  units  )  const
const timeUnit & timeUnit::day (  )  [static]

Definition at line 836 of file Time.C.

References _day, and dayHelp().

Referenced by timeLength::dayHelp(), leapYearHelp(), operator<<(), and yearHelp().

const timeUnit * timeUnit::dayHelp (  )  [static, private]

Definition at line 81 of file Time.C.

References get_ns_per_unit(), fraction::getNumer(), hour(), I64_C, and timeUnit().

Referenced by day().

fraction timeUnit::get_ns_per_unit (  )  const

Definition at line 803 of file Time.C.

References ns_per_unit.

Referenced by timeBase::b1970Help(), dayHelp(), hourHelp(), leapYearHelp(), minHelp(), operator<<(), and yearHelp().

fraction timeUnit::get_units_per_ns (  )  const

Definition at line 804 of file Time.C.

References units_per_ns.

Referenced by operator<<().

const timeUnit & timeUnit::hour (  )  [static]

Definition at line 832 of file Time.C.

References _hour, and hourHelp().

Referenced by dayHelp(), timeLength::hourHelp(), and operator<<().

const timeUnit * timeUnit::hourHelp (  )  [static, private]

Definition at line 77 of file Time.C.

References get_ns_per_unit(), fraction::getNumer(), I64_C, minute(), and timeUnit().

Referenced by hour().

const timeUnit & timeUnit::leapYear (  )  [static]

Definition at line 844 of file Time.C.

References _leapYear, and leapYearHelp().

Referenced by timeBase::b1970Help(), and timeLength::leapYearHelp().

const timeUnit * timeUnit::leapYearHelp (  )  [static, private]

Definition at line 90 of file Time.C.

References day(), get_ns_per_unit(), fraction::getNumer(), and timeUnit().

Referenced by leapYear().

const timeUnit * timeUnit::minHelp (  )  [static, private]

Definition at line 73 of file Time.C.

References get_ns_per_unit(), fraction::getNumer(), I64_C, sec(), and timeUnit().

Referenced by minute().

const timeUnit & timeUnit::minute (  )  [static]

Definition at line 828 of file Time.C.

References _minute, and minHelp().

Referenced by hourHelp(), timeLength::minHelp(), and operator<<().

const timeUnit & timeUnit::ms (  )  [static]

Definition at line 820 of file Time.C.

References _ms, and msHelp().

Referenced by timeLength::msHelp(), and operator<<().

const timeUnit * timeUnit::msHelp (  )  [static, private]

Definition at line 67 of file Time.C.

References timeUnit().

Referenced by ms().

const timeUnit & timeUnit::ns (  )  [static]

Definition at line 812 of file Time.C.

References _ns, and nsHelp().

Referenced by timeLength::nsHelp(), operator<<(), relTimeStamp::relTimeStamp(), and timeStamp::timeStamp().

const timeUnit * timeUnit::nsHelp (  )  [static, private]

Definition at line 61 of file Time.C.

References timeUnit().

Referenced by ns().

const timeUnit & timeUnit::sec (  )  [static]
const timeUnit * timeUnit::secHelp (  )  [static, private]

Definition at line 70 of file Time.C.

References timeUnit().

Referenced by sec().

void timeUnit::set_ns_per_unit ( const fraction nspu  ) 

Definition at line 807 of file Time.C.

References ns_per_unit, fraction::reciprocal(), and units_per_ns.

const timeUnit & timeUnit::us (  )  [static]

Definition at line 816 of file Time.C.

References _us, and usHelp().

Referenced by getCurrentTime(), operator<<(), and timeLength::usHelp().

const timeUnit * timeUnit::usHelp (  )  [static, private]

Definition at line 64 of file Time.C.

References timeUnit().

Referenced by us().

const timeUnit & timeUnit::year (  )  [static]
const timeUnit * timeUnit::yearHelp (  )  [static, private]

Definition at line 85 of file Time.C.

References day(), get_ns_per_unit(), fraction::getNumer(), and timeUnit().

Referenced by year().


Field Documentation

const timeUnit * timeUnit::_day = NULL [static, private]

Definition at line 62 of file Time.h.

Referenced by day().

const timeUnit * timeUnit::_hour = NULL [static, private]

Definition at line 63 of file Time.h.

Referenced by hour().

const timeUnit * timeUnit::_leapYear = NULL [static, private]

Definition at line 60 of file Time.h.

Referenced by leapYear().

const timeUnit * timeUnit::_minute = NULL [static, private]

Definition at line 64 of file Time.h.

Referenced by minute().

const timeUnit * timeUnit::_ms = NULL [static, private]

Definition at line 66 of file Time.h.

Referenced by ms().

const timeUnit * timeUnit::_ns = NULL [static, private]

Definition at line 68 of file Time.h.

Referenced by ns().

const timeUnit * timeUnit::_sec = NULL [static, private]

Definition at line 65 of file Time.h.

Referenced by sec().

const timeUnit * timeUnit::_us = NULL [static, private]

Definition at line 67 of file Time.h.

Referenced by us().

const timeUnit * timeUnit::_year = NULL [static, private]

Definition at line 61 of file Time.h.

Referenced by year().

timeUnit::ostream_fmt timeUnit::curFmt = timeUnit::sparse [static]

Definition at line 91 of file Time.h.

Referenced by operator<<().

Definition at line 94 of file Time.h.

Referenced by cvtTo_ns(), get_ns_per_unit(), set_ns_per_unit(), and timeUnit().

Definition at line 95 of file Time.h.

Referenced by cvtFrom_nsD(), cvtFrom_nsI(), get_units_per_ns(), set_ns_per_unit(), and timeUnit().


The documentation for this class was generated from the following files:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 12 Jul 2013 for SymtabAPI by  doxygen 1.6.1