Public Member Functions | Static Public Member Functions | Friends

mozilla::TimeDuration Class Reference

Instances of this class represent the length of an interval of time. More...

#include <TimeStamp.h>

List of all members.

Public Member Functions

 TimeDuration ()
 TimeDuration (_SomethingVeryRandomHere *aZero)
double ToSeconds () const
double ToSecondsSigDigits () const
double ToMilliseconds () const
TimeDuration operator+ (const TimeDuration &aOther) const
TimeDuration operator- (const TimeDuration &aOther) const
TimeDurationoperator+= (const TimeDuration &aOther)
TimeDurationoperator-= (const TimeDuration &aOther)
PRBool operator< (const TimeDuration &aOther) const
PRBool operator<= (const TimeDuration &aOther) const
PRBool operator>= (const TimeDuration &aOther) const
PRBool operator> (const TimeDuration &aOther) const

Static Public Member Functions

static TimeDuration FromSeconds (double aSeconds)
static TimeDuration FromMilliseconds (double aMilliseconds)
static TimeDuration Resolution ()


class TimeStamp

Detailed Description

Instances of this class represent the length of an interval of time.

Negative durations are allowed, meaning the end is before the start.

Internally the duration is stored as a PRInt64 in units of PR_TicksPerSecond() when building with NSPR interval timers, or a system-dependent unit when building with system clocks. The system-dependent unit must be constant, otherwise the semantics of this class would be broken.

Constructor & Destructor Documentation

mozilla::TimeDuration::TimeDuration (  )  [inline]
mozilla::TimeDuration::TimeDuration ( _SomethingVeryRandomHere *  aZero  )  [inline]

Member Function Documentation

static TimeDuration mozilla::TimeDuration::FromMilliseconds ( double  aMilliseconds  )  [static]
static TimeDuration mozilla::TimeDuration::FromSeconds ( double  aSeconds  )  [inline, static]
TimeDuration mozilla::TimeDuration::operator+ ( const TimeDuration aOther  )  const [inline]
TimeDuration& mozilla::TimeDuration::operator+= ( const TimeDuration aOther  )  [inline]
TimeDuration mozilla::TimeDuration::operator- ( const TimeDuration aOther  )  const [inline]
TimeDuration& mozilla::TimeDuration::operator-= ( const TimeDuration aOther  )  [inline]
PRBool mozilla::TimeDuration::operator< ( const TimeDuration aOther  )  const [inline]
PRBool mozilla::TimeDuration::operator<= ( const TimeDuration aOther  )  const [inline]
PRBool mozilla::TimeDuration::operator> ( const TimeDuration aOther  )  const [inline]
PRBool mozilla::TimeDuration::operator>= ( const TimeDuration aOther  )  const [inline]
static TimeDuration mozilla::TimeDuration::Resolution (  )  [static]
double mozilla::TimeDuration::ToMilliseconds (  )  const [inline]
double mozilla::TimeDuration::ToSeconds (  )  const
double mozilla::TimeDuration::ToSecondsSigDigits (  )  const

Friends And Related Function Documentation

friend class TimeStamp [friend]

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