Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes
DUtils::Timestamp Class Reference

#include <Timestamp.h>

List of all members.

Public Types

enum  tOptions { NONE = 0, CURRENT_TIME = 0x1 }

Public Member Functions

string Format (bool machine_friendly=false) const
double getFloatTime () const
string getStringTime () const
Timestamp operator+ (double s) const
double operator- (const Timestamp &t) const
Timestamp operator- (double s) const
bool operator< (const Timestamp &t) const
bool operator<= (const Timestamp &t) const
bool operator== (const Timestamp &t) const
bool operator> (const Timestamp &t) const
bool operator>= (const Timestamp &t) const
void setTime (unsigned long secs, unsigned long usecs)
void setTime (const string &stime)
void setToCurrentTime ()
 Timestamp (Timestamp::tOptions option=NONE)
 ~Timestamp (void)

Static Public Member Functions

static string Format (double s)

Protected Attributes

unsigned long m_secs
unsigned long m_usecs

Detailed Description

Definition at line 31 of file Timestamp.h.


Member Enumeration Documentation

Enumerator:
NONE 
CURRENT_TIME 

Definition at line 34 of file Timestamp.h.


Constructor & Destructor Documentation

Definition at line 45 of file Timestamp.cpp.

Definition at line 51 of file Timestamp.cpp.


Member Function Documentation

string Timestamp::Format ( bool  machine_friendly = false) const

Returns the timestamp in a human-readable string

Parameters:
machine_friendlyif true, the returned string is formatted to yyyymmdd_hhmmss, without weekday or spaces
Note:
This has not been tested under Windows
The timestamp is truncated to seconds

Definition at line 167 of file Timestamp.cpp.

string Timestamp::Format ( double  s) [static]

Definition at line 195 of file Timestamp.cpp.

double Timestamp::getFloatTime ( ) const

Definition at line 85 of file Timestamp.cpp.

string Timestamp::getStringTime ( ) const

Definition at line 89 of file Timestamp.cpp.

Timestamp Timestamp::operator+ ( double  s) const

Definition at line 99 of file Timestamp.cpp.

double Timestamp::operator- ( const Timestamp t) const

Definition at line 95 of file Timestamp.cpp.

Timestamp Timestamp::operator- ( double  s) const

Definition at line 116 of file Timestamp.cpp.

bool Timestamp::operator< ( const Timestamp t) const

Definition at line 147 of file Timestamp.cpp.

bool Timestamp::operator<= ( const Timestamp t) const

Definition at line 154 of file Timestamp.cpp.

bool Timestamp::operator== ( const Timestamp t) const

Definition at line 161 of file Timestamp.cpp.

bool Timestamp::operator> ( const Timestamp t) const

Definition at line 133 of file Timestamp.cpp.

bool Timestamp::operator>= ( const Timestamp t) const

Definition at line 140 of file Timestamp.cpp.

void DUtils::Timestamp::setTime ( unsigned long  secs,
unsigned long  usecs 
) [inline]

Definition at line 52 of file Timestamp.h.

void Timestamp::setTime ( const string &  stime)

Definition at line 72 of file Timestamp.cpp.

Definition at line 55 of file Timestamp.cpp.


Member Data Documentation

unsigned long DUtils::Timestamp::m_secs [protected]

Definition at line 129 of file Timestamp.h.

unsigned long DUtils::Timestamp::m_usecs [protected]

Definition at line 130 of file Timestamp.h.


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


re_vision
Author(s): Dorian Galvez-Lopez
autogenerated on Sun Jan 5 2014 11:34:29