cxxtools::WeakTimespan< Resolution > Class Template Reference

A WeakTimespan extends a Timespan with a implicit conversion to and from number. More...

#include <tntdb/cxxtools/timespan.h>

Inheritance diagram for cxxtools::WeakTimespan< Resolution >:
cxxtools::Timespan

Public Member Functions

 WeakTimespan ()
 WeakTimespan (short units)
 WeakTimespan (unsigned short units)
 WeakTimespan (int units)
 WeakTimespan (unsigned int units)
 WeakTimespan (long units)
 WeakTimespan (unsigned long units)
 WeakTimespan (float units)
 WeakTimespan (double units)
 WeakTimespan (long double units)
 WeakTimespan (const Timespan &ts)
 WeakTimespan (long seconds, long microseconds)
 WeakTimespan (int days, int hours, int minutes, int seconds, int microseconds)
 operator double () const
int64_t ceil () const
- Public Member Functions inherited from cxxtools::Timespan
 Timespan (int64_t microseconds=0)
 Creates a Timespan.
 Timespan (long seconds, long microseconds)
 Creates a Timespan.
 Timespan (int days, int hours, int minutes, int seconds, int microseconds)
 Creates a Timespan.
bool operator== (const Timespan &ts) const
bool operator!= (const Timespan &ts) const
bool operator> (const Timespan &ts) const
bool operator>= (const Timespan &ts) const
bool operator< (const Timespan &ts) const
bool operator<= (const Timespan &ts) const
Timespan operator+ (const Timespan &d) const
Timespan operator- (const Timespan &d) const
Timespanoperator+= (const Timespan &d)
Timespanoperator-= (const Timespan &d)
Timespan operator- () const
double totalDays () const
 Returns the total number of hours.
double totalHours () const
 Returns the total number of hours.
double totalMinutes () const
 Returns the total number of minutes.
double totalSeconds () const
 Returns the total number of seconds.
double totalMSecs () const
 Returns the total number of milliseconds.
int64_t totalUSecs () const
 Returns the total number of microseconds.

Additional Inherited Members

- Static Public Member Functions inherited from cxxtools::Timespan
static Timespan gettimeofday ()
 returns the current time as a timespan value.

Detailed Description

template<int64_t Resolution>
class cxxtools::WeakTimespan< Resolution >

A WeakTimespan extends a Timespan with a implicit conversion to and from number.

The template parameter specifies, which unit is returned. It is the divisor needed to convert a number of microseconds to the requested unit. The template class is normally not used directly but the typedefs cxxtools::Microseconds, cxxtools::Milliseconds, cxxtools::Seconds, cxxtools::Minutes, cxxtools::Hours and cxxtools::Days are used.

Constructor & Destructor Documentation

template<int64_t Resolution>
cxxtools::WeakTimespan< Resolution >::WeakTimespan ( )
inline
template<int64_t Resolution>
cxxtools::WeakTimespan< Resolution >::WeakTimespan ( short  units)
inline
template<int64_t Resolution>
cxxtools::WeakTimespan< Resolution >::WeakTimespan ( unsigned short  units)
inline
template<int64_t Resolution>
cxxtools::WeakTimespan< Resolution >::WeakTimespan ( int  units)
inline
template<int64_t Resolution>
cxxtools::WeakTimespan< Resolution >::WeakTimespan ( unsigned int  units)
inline
template<int64_t Resolution>
cxxtools::WeakTimespan< Resolution >::WeakTimespan ( long  units)
inline
template<int64_t Resolution>
cxxtools::WeakTimespan< Resolution >::WeakTimespan ( unsigned long  units)
inline
template<int64_t Resolution>
cxxtools::WeakTimespan< Resolution >::WeakTimespan ( float  units)
inline
template<int64_t Resolution>
cxxtools::WeakTimespan< Resolution >::WeakTimespan ( double  units)
inline
template<int64_t Resolution>
cxxtools::WeakTimespan< Resolution >::WeakTimespan ( long double  units)
inline
template<int64_t Resolution>
cxxtools::WeakTimespan< Resolution >::WeakTimespan ( const Timespan ts)
inline
template<int64_t Resolution>
cxxtools::WeakTimespan< Resolution >::WeakTimespan ( long  seconds,
long  microseconds 
)
inline
template<int64_t Resolution>
cxxtools::WeakTimespan< Resolution >::WeakTimespan ( int  days,
int  hours,
int  minutes,
int  seconds,
int  microseconds 
)
inline

Member Function Documentation

template<int64_t Resolution>
int64_t cxxtools::WeakTimespan< Resolution >::ceil ( ) const
inline
template<int64_t Resolution>
cxxtools::WeakTimespan< Resolution >::operator double ( ) const
inline

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