TwiceAsNice  2019-02-18
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Nice::Time Class Reference

#include <Time.h>

Inheritance diagram for Nice::Time:
Inheritance graph
Collaboration diagram for Nice::Time:
Collaboration graph

Public Member Functions

 Time (const Time &)
 
 Time (const Nice::TimeVar &)
 
 Time ()
 
 operator timeval () const
 
 operator timespec () const
 
 operator time_t () const
 
 operator boost::xtime () const
 
long toSeconds () const
 
long toMilliSeconds () const
 
Nice::I64 toMicroSeconds () const
 
Nice::I64 toNanoSeconds () const
 
double toSecondsDouble () const
 
double toMilliSecondsDouble () const
 
double toMicroSecondsDouble () const
 
IceUtil::Time toIceUtilTime () const
 
 operator IceUtil::Time () const
 
int hour () const
 
int minute () const
 Extract the fraction of minutes. More...
 
int second () const
 Extract the fraction of seconds. More...
 
int milliSecond () const
 Extract the fraction of milliseconds. More...
 
int microSecond () const
 
int nanoSecond () const
 
std::string toString (int _precision=9) const
 
Time operator- () const
 Negate the time value (flip sign) More...
 
Time operator- (const Time &rhs) const
 subtract a time interval More...
 
Time operator+ (const Time &rhs) const
 add a time interval More...
 
Timeoperator+= (const Time &rhs)
 increment this by a time interval More...
 
Timeoperator-= (const Time &rhs)
 decrement this by a time interval More...
 
bool operator< (const Time &rhs) const
 Test whether this time is earlier than another. More...
 
bool operator<= (const Time &rhs) const
 Test whether this time is not latter than another. More...
 
bool operator> (const Time &rhs) const
 Test whether this time is latter than another. More...
 
bool operator>= (const Time &rhs) const
 
bool operator== (const Time &rhs) const
 
bool operator!= (const Time &rhs) const
 
Timeoperator*= (int rhs)
 Multiply the time interval by a factor. More...
 
Time operator* (int rhs) const
 
Timeoperator/= (int rhs)
 
Time operator/ (int rhs) const
 
Timeoperator*= (double rhs)
 
Time operator* (double rhs) const
 
Timeoperator/= (double rhs)
 
Time operator/ (double rhs) const
 
Nice::I64 operator/ (const Time &rhs) const
 
Timeoperator/= (const Time &rhs)
 
 Time (const Time &)
 
 Time (const Nice::TimeVar &)
 
 Time ()
 
 operator timeval () const
 
 operator timespec () const
 
 operator time_t () const
 
 operator boost::xtime () const
 
long toSeconds () const
 
long toMilliSeconds () const
 
Nice::I64 toMicroSeconds () const
 
Nice::I64 toNanoSeconds () const
 
double toSecondsDouble () const
 
double toMilliSecondsDouble () const
 
double toMicroSecondsDouble () const
 
IceUtil::Time toIceUtilTime () const
 
 operator IceUtil::Time () const
 
int hour () const
 
int minute () const
 
int second () const
 
int milliSecond () const
 
int microSecond () const
 
int nanoSecond () const
 
std::string toString (int _precision=9) const
 
Time operator- () const
 Negate the time value (flip sign) More...
 
Time operator- (const Time &rhs) const
 subtract a time interval More...
 
Time operator+ (const Time &rhs) const
 add a time interval More...
 
Timeoperator+= (const Time &rhs)
 increment this by a time interval More...
 
Timeoperator-= (const Time &rhs)
 decrement this by a time interval More...
 
bool operator< (const Time &rhs) const
 Test whether this time is earlier than another. More...
 
bool operator<= (const Time &rhs) const
 Test whether this time is not latter than another. More...
 
bool operator> (const Time &rhs) const
 Test whether this time is latter than another. More...
 
bool operator>= (const Time &rhs) const
 
bool operator== (const Time &rhs) const
 
bool operator!= (const Time &rhs) const
 
Timeoperator*= (int rhs)
 Multiply the time interval by a factor. More...
 
Time operator* (int rhs) const
 
Timeoperator/= (int rhs)
 
Time operator/ (int rhs) const
 
Timeoperator*= (double rhs)
 
Time operator* (double rhs) const
 
Timeoperator/= (double rhs)
 
Time operator/ (double rhs) const
 
Nice::I64 operator/ (const Time &rhs) const
 
Timeoperator/= (const Time &rhs)
 
- Public Member Functions inherited from Nice::TimeVar
bool operator== (const TimeVar &__rhs) const
 
bool operator< (const TimeVar &__rhs) const
 
bool operator!= (const TimeVar &__rhs) const
 
bool operator<= (const TimeVar &__rhs) const
 
bool operator> (const TimeVar &__rhs) const
 
bool operator>= (const TimeVar &__rhs) const
 
bool operator== (const TimeVar &__rhs) const
 
bool operator< (const TimeVar &__rhs) const
 
bool operator!= (const TimeVar &__rhs) const
 
bool operator<= (const TimeVar &__rhs) const
 
bool operator> (const TimeVar &__rhs) const
 
bool operator>= (const TimeVar &__rhs) const
 

Static Public Member Functions

static Time seconds (double _s)
 
static Time milliSeconds (int)
 
static Time microSeconds (Nice::I64)
 
static Time nanoSeconds (Nice::I64)
 
static Time seconds (double _s)
 
static Time milliSeconds (int)
 
static Time microSeconds (Nice::I64)
 
static Time nanoSeconds (Nice::I64)
 

Protected Member Functions

 Time (Nice::I64)
 
 Time (Nice::I64)
 

Additional Inherited Members

- Public Attributes inherited from Nice::TimeVar
::Ice::Long nsec
 

Constructor & Destructor Documentation

◆ Time() [1/8]

Nice::Time::Time ( Nice::I64  _t)
protected

◆ Time() [2/8]

Nice::Time::Time ( const Time _t)

◆ Time() [3/8]

Nice::Time::Time ( const Nice::TimeVar _t)

◆ Time() [4/8]

Nice::Time::Time ( )

◆ Time() [5/8]

Nice::Time::Time ( Nice::I64  )
protected

◆ Time() [6/8]

Nice::Time::Time ( const Time )

◆ Time() [7/8]

Nice::Time::Time ( const Nice::TimeVar )

◆ Time() [8/8]

Nice::Time::Time ( )

Member Function Documentation

◆ hour() [1/2]

int Nice::Time::hour ( ) const

◆ hour() [2/2]

int Nice::Time::hour ( ) const

◆ microSecond() [1/2]

int Nice::Time::microSecond ( ) const

◆ microSecond() [2/2]

int Nice::Time::microSecond ( ) const

◆ microSeconds() [1/2]

Nice::Time Nice::Time::microSeconds ( Nice::I64  t)
static

◆ microSeconds() [2/2]

static Time Nice::Time::microSeconds ( Nice::I64  )
static

◆ milliSecond() [1/2]

int Nice::Time::milliSecond ( ) const

◆ milliSecond() [2/2]

int Nice::Time::milliSecond ( ) const

Extract the fraction of milliseconds.

Since
2016-11-19
Returns
the milliseconds in the range 0 to 999.

◆ milliSeconds() [1/2]

static Time Nice::Time::milliSeconds ( int  )
static

◆ milliSeconds() [2/2]

Nice::Time Nice::Time::milliSeconds ( int  t)
static

◆ minute() [1/2]

int Nice::Time::minute ( ) const

Extract the fraction of minutes.

Returns
the seconds in the range 0 to 59.

◆ minute() [2/2]

int Nice::Time::minute ( ) const

◆ nanoSecond() [1/2]

int Nice::Time::nanoSecond ( ) const

◆ nanoSecond() [2/2]

int Nice::Time::nanoSecond ( ) const

◆ nanoSeconds() [1/2]

Nice::Time Nice::Time::nanoSeconds ( Nice::I64  t)
static

◆ nanoSeconds() [2/2]

static Time Nice::Time::nanoSeconds ( Nice::I64  )
static

◆ operator boost::xtime() [1/2]

Nice::Time::operator boost::xtime ( ) const

◆ operator boost::xtime() [2/2]

Nice::Time::operator boost::xtime ( ) const

◆ operator IceUtil::Time() [1/2]

Nice::Time::operator IceUtil::Time ( ) const

◆ operator IceUtil::Time() [2/2]

Nice::Time::operator IceUtil::Time ( ) const

◆ operator time_t() [1/2]

Nice::Time::operator time_t ( ) const

◆ operator time_t() [2/2]

Nice::Time::operator time_t ( ) const

◆ operator timespec() [1/2]

Nice::Time::operator timespec ( ) const

◆ operator timespec() [2/2]

Nice::Time::operator timespec ( ) const

◆ operator timeval() [1/2]

Nice::Time::operator timeval ( ) const

◆ operator timeval() [2/2]

Nice::Time::operator timeval ( ) const

◆ operator!=() [1/2]

bool Nice::Time::operator!= ( const Time rhs) const
inline

◆ operator!=() [2/2]

bool Nice::Time::operator!= ( const Time rhs) const
inline

◆ operator*() [1/4]

Time Nice::Time::operator* ( int  rhs) const
inline

◆ operator*() [2/4]

Time Nice::Time::operator* ( int  rhs) const
inline

◆ operator*() [3/4]

Time Nice::Time::operator* ( double  rhs) const
inline

◆ operator*() [4/4]

Time Nice::Time::operator* ( double  rhs) const
inline

◆ operator*=() [1/4]

Time& Nice::Time::operator*= ( int  rhs)
inline

Multiply the time interval by a factor.

Parameters
rhsthe stretch factor.
Returns
This time interval multiplied by the factor.

◆ operator*=() [2/4]

Time& Nice::Time::operator*= ( int  rhs)
inline

Multiply the time interval by a factor.

Parameters
rhsthe stretch factor.
Returns
This time interval multiplied by the factor.

◆ operator*=() [3/4]

Time& Nice::Time::operator*= ( double  rhs)
inline

◆ operator*=() [4/4]

Time& Nice::Time::operator*= ( double  rhs)
inline

◆ operator+() [1/2]

Time Nice::Time::operator+ ( const Time rhs) const
inline

add a time interval

Parameters
rhsThe interval to be added
Returns
this plus rhs.

◆ operator+() [2/2]

Time Nice::Time::operator+ ( const Time rhs) const
inline

add a time interval

Parameters
rhsThe interval to be added
Returns
this plus rhs.

◆ operator+=() [1/2]

Time& Nice::Time::operator+= ( const Time rhs)
inline

increment this by a time interval

Parameters
rhsThe interval to be added

◆ operator+=() [2/2]

Time& Nice::Time::operator+= ( const Time rhs)
inline

increment this by a time interval

Parameters
rhsThe interval to be added

◆ operator-() [1/4]

Time Nice::Time::operator- ( ) const
inline

Negate the time value (flip sign)

◆ operator-() [2/4]

Time Nice::Time::operator- ( ) const
inline

Negate the time value (flip sign)

◆ operator-() [3/4]

Time Nice::Time::operator- ( const Time rhs) const
inline

subtract a time interval

Parameters
rhsThe interval to be subtracted
Returns
this minus rhs.

◆ operator-() [4/4]

Time Nice::Time::operator- ( const Time rhs) const
inline

subtract a time interval

Parameters
rhsThe interval to be subtracted
Returns
this minus rhs.

◆ operator-=() [1/2]

Time& Nice::Time::operator-= ( const Time rhs)
inline

decrement this by a time interval

Parameters
rhsThe interval to be added

◆ operator-=() [2/2]

Time& Nice::Time::operator-= ( const Time rhs)
inline

decrement this by a time interval

Parameters
rhsThe interval to be added

◆ operator/() [1/6]

Time Nice::Time::operator/ ( int  rhs) const
inline

◆ operator/() [2/6]

Time Nice::Time::operator/ ( int  rhs) const
inline

◆ operator/() [3/6]

Time Nice::Time::operator/ ( double  rhs) const
inline

◆ operator/() [4/6]

Time Nice::Time::operator/ ( double  rhs) const
inline

◆ operator/() [5/6]

Nice::I64 Nice::Time::operator/ ( const Time rhs) const
inline

◆ operator/() [6/6]

Nice::I64 Nice::Time::operator/ ( const Time rhs) const
inline

◆ operator/=() [1/6]

Time& Nice::Time::operator/= ( int  rhs)
inline

◆ operator/=() [2/6]

Time& Nice::Time::operator/= ( int  rhs)
inline

◆ operator/=() [3/6]

Time& Nice::Time::operator/= ( double  rhs)
inline

◆ operator/=() [4/6]

Time& Nice::Time::operator/= ( double  rhs)
inline

◆ operator/=() [5/6]

Time& Nice::Time::operator/= ( const Time rhs)
inline

◆ operator/=() [6/6]

Time& Nice::Time::operator/= ( const Time rhs)
inline

◆ operator<() [1/2]

bool Nice::Time::operator< ( const Time rhs) const
inline

Test whether this time is earlier than another.

Parameters
rhsthe reference time
Returns
true if this is earlier than the reference time

◆ operator<() [2/2]

bool Nice::Time::operator< ( const Time rhs) const
inline

Test whether this time is earlier than another.

Parameters
rhsthe reference time
Returns
true if this is earlier than the reference time

◆ operator<=() [1/2]

bool Nice::Time::operator<= ( const Time rhs) const
inline

Test whether this time is not latter than another.

Parameters
rhsthe reference time
Returns
true if this is not latter than the reference time

◆ operator<=() [2/2]

bool Nice::Time::operator<= ( const Time rhs) const
inline

Test whether this time is not latter than another.

Parameters
rhsthe reference time
Returns
true if this is not latter than the reference time

◆ operator==() [1/2]

bool Nice::Time::operator== ( const Time rhs) const
inline

◆ operator==() [2/2]

bool Nice::Time::operator== ( const Time rhs) const
inline

◆ operator>() [1/2]

bool Nice::Time::operator> ( const Time rhs) const
inline

Test whether this time is latter than another.

Parameters
rhsthe reference time
Returns
true if this is latter than the reference time

◆ operator>() [2/2]

bool Nice::Time::operator> ( const Time rhs) const
inline

Test whether this time is latter than another.

Parameters
rhsthe reference time
Returns
true if this is latter than the reference time

◆ operator>=() [1/2]

bool Nice::Time::operator>= ( const Time rhs) const
inline

◆ operator>=() [2/2]

bool Nice::Time::operator>= ( const Time rhs) const
inline

◆ second() [1/2]

int Nice::Time::second ( ) const

◆ second() [2/2]

int Nice::Time::second ( ) const

Extract the fraction of seconds.

Returns
the seconds in the range 0 to 59.

◆ seconds() [1/2]

Nice::Time Nice::Time::seconds ( double  _s)
static

◆ seconds() [2/2]

static Time Nice::Time::seconds ( double  _s)
static

◆ toIceUtilTime() [1/2]

IceUtil::Time Nice::Time::toIceUtilTime ( ) const

◆ toIceUtilTime() [2/2]

IceUtil::Time Nice::Time::toIceUtilTime ( ) const

◆ toMicroSeconds() [1/2]

Nice::I64 Nice::Time::toMicroSeconds ( ) const

◆ toMicroSeconds() [2/2]

Nice::I64 Nice::Time::toMicroSeconds ( ) const

◆ toMicroSecondsDouble() [1/2]

double Nice::Time::toMicroSecondsDouble ( ) const

◆ toMicroSecondsDouble() [2/2]

double Nice::Time::toMicroSecondsDouble ( ) const

◆ toMilliSeconds() [1/2]

long Nice::Time::toMilliSeconds ( ) const

◆ toMilliSeconds() [2/2]

long Nice::Time::toMilliSeconds ( ) const

◆ toMilliSecondsDouble() [1/2]

double Nice::Time::toMilliSecondsDouble ( ) const

◆ toMilliSecondsDouble() [2/2]

double Nice::Time::toMilliSecondsDouble ( ) const

◆ toNanoSeconds() [1/2]

Nice::I64 Nice::Time::toNanoSeconds ( ) const

◆ toNanoSeconds() [2/2]

Nice::I64 Nice::Time::toNanoSeconds ( ) const

◆ toSeconds() [1/2]

long Nice::Time::toSeconds ( ) const

◆ toSeconds() [2/2]

long Nice::Time::toSeconds ( ) const

◆ toSecondsDouble() [1/2]

double Nice::Time::toSecondsDouble ( ) const

◆ toSecondsDouble() [2/2]

double Nice::Time::toSecondsDouble ( ) const

◆ toString() [1/2]

std::string Nice::Time::toString ( int  _precision = 9) const

◆ toString() [2/2]

std::string Nice::Time::toString ( int  _precision = 9) const

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