cxxtools::WeakTimespan< 1 > Class Template Reference

A WeakTimespan<1> specializes a WeakTimespan for microseconds. More...

#include <tntdb/cxxtools/timespan.h>

Inheritance diagram for cxxtools::WeakTimespan< 1 >:
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)
 operator int64_t () 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<>
class cxxtools::WeakTimespan< 1 >

A WeakTimespan<1> specializes a WeakTimespan for microseconds.

Since the Timespan holds the total number of microseconds, it can be returned as a int64_t instead of double to prevent conversion.

Constructor & Destructor Documentation

cxxtools::WeakTimespan< 1 >::WeakTimespan ( short  units)
inline
cxxtools::WeakTimespan< 1 >::WeakTimespan ( unsigned short  units)
inline
cxxtools::WeakTimespan< 1 >::WeakTimespan ( int  units)
inline
cxxtools::WeakTimespan< 1 >::WeakTimespan ( unsigned int  units)
inline
cxxtools::WeakTimespan< 1 >::WeakTimespan ( long  units)
inline
cxxtools::WeakTimespan< 1 >::WeakTimespan ( unsigned long  units)
inline
cxxtools::WeakTimespan< 1 >::WeakTimespan ( float  units)
inline
cxxtools::WeakTimespan< 1 >::WeakTimespan ( double  units)
inline
cxxtools::WeakTimespan< 1 >::WeakTimespan ( long double  units)
inline
cxxtools::WeakTimespan< 1 >::WeakTimespan ( const Timespan ts)
inline

Member Function Documentation

cxxtools::WeakTimespan< 1 >::operator int64_t ( ) const
inline

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