Gazebo

Time Class Reference
[Server]

#include <Time.hh>

List of all members.


Detailed Description

A Time class
Todo:
: replace this with Boost

Public Member Functions

 Time ()
 Time (const Time &time)
 Time (const struct timeval &tv)
 Time (int sec, int usec)
 Time (double time)
virtual ~Time ()
void SetToWallTime ()
void Set (int sec, int usec)
void Set (double seconds)
double Double () const
const Timeoperator= (const struct timeval &tv)
const Timeoperator= (const Time &time)
Time operator+ (const struct timeval &tv) const
const Timeoperator+= (const struct timeval &tv)
Time operator+ (const Time &time) const
const Timeoperator+= (const Time &time)
Time operator- (const struct timeval &tv) const
const Timeoperator-= (const struct timeval &tv)
Time operator- (const Time &time) const
const Timeoperator-= (const Time &time)
Time operator * (const struct timeval &tv) const
const Timeoperator *= (const struct timeval &tv)
Time operator * (const Time &time) const
const Timeoperator *= (const Time &time)
Time operator/ (const struct timeval &tv) const
const Timeoperator/= (const struct timeval &tv)
Time operator/ (const Time &time) const
const Timeoperator/= (const Time &time)
bool operator== (const struct timeval &tv) const
bool operator== (const Time &time) const
bool operator== (double time) const
bool operator!= (const struct timeval &tv) const
bool operator!= (const Time &time) const
bool operator!= (double time) const
bool operator< (const struct timeval &tv) const
bool operator< (const Time &time) const
bool operator< (double time) const
bool operator<= (const struct timeval &tv) const
bool operator<= (const Time &time) const
bool operator<= (double time) const
bool operator> (const struct timeval &tv) const
bool operator> (const Time &time) const
bool operator> (double time) const
bool operator>= (const struct timeval &tv) const
bool operator>= (const Time &time) const
bool operator>= (double time) const

Static Public Member Functions

static Time GetWallTime ()

Public Attributes

int sec
 Seconds.
int usec
 Microseconds.

Friends

std::ostream & operator<< (std::ostream &out, const Time &time)
 Stream operators.

Constructor & Destructor Documentation

Time (  ) 

Constructors

Time ( const Time time  ) 

Copy constructor

Parameters:
time Time to copy

Time ( const struct timeval &  tv  ) 

Constructor

Parameters:
tv Time to initialize to

Time ( int  sec,
int  usec 
)

Constructor

Parameters:
sec Seconds
usec Microseconds

Time ( double  time  ) 

Constuctor

Parameters:
time Time in double format sec.usec

virtual ~Time (  )  [virtual]

Destructor


Member Function Documentation

static Time GetWallTime (  )  [static]

Get the wall time

void SetToWallTime (  ) 

Set the time to the wall time

void Set ( int  sec,
int  usec 
)

Set to sec and usec

Parameters:
sec Seconds
usec micro seconds

void Set ( double  seconds  ) 

Set to seconds

Parameters:
seconds Number of seconds

double Double (  )  const

Get the time as a double

Returns:
Time as a double

const Time& operator= ( const struct timeval &  tv  ) 

Equal opeator

const Time& operator= ( const Time time  ) 

Equal opeator

Time operator+ ( const struct timeval &  tv  )  const

Addition operators

const Time& operator+= ( const struct timeval &  tv  ) 

Addition operators

Time operator+ ( const Time time  )  const

Addition operators

const Time& operator+= ( const Time time  ) 

Addition operators

Time operator- ( const struct timeval &  tv  )  const

Subtraction operator

const Time& operator-= ( const struct timeval &  tv  ) 

Subtraction operator

Time operator- ( const Time time  )  const

Subtraction operator

const Time& operator-= ( const Time time  ) 

Subtraction operator

Time operator * ( const struct timeval &  tv  )  const

Multiplication operators

const Time& operator *= ( const struct timeval &  tv  ) 

Multiplication operators

Time operator * ( const Time time  )  const

Multiplication operators

const Time& operator *= ( const Time time  ) 

Multiplication operators

Time operator/ ( const struct timeval &  tv  )  const

Division operators

const Time& operator/= ( const struct timeval &  tv  ) 

Division operators

Time operator/ ( const Time time  )  const

Division operators

const Time& operator/= ( const Time time  ) 

Division operators

bool operator== ( const struct timeval &  tv  )  const

Equality operators

bool operator== ( const Time time  )  const

Equality operators

bool operator== ( double  time  )  const

Equality operators

bool operator!= ( const struct timeval &  tv  )  const

Equality operators

bool operator!= ( const Time time  )  const

Equality operators

bool operator!= ( double  time  )  const

Equality operators

bool operator< ( const struct timeval &  tv  )  const

Equality operators

bool operator< ( const Time time  )  const

Equality operators

bool operator< ( double  time  )  const

Equality operators

bool operator<= ( const struct timeval &  tv  )  const

Equality operators

bool operator<= ( const Time time  )  const

Equality operators

bool operator<= ( double  time  )  const

Equality operators

bool operator> ( const struct timeval &  tv  )  const

Equality operators

bool operator> ( const Time time  )  const

Equality operators

bool operator> ( double  time  )  const

Equality operators

bool operator>= ( const struct timeval &  tv  )  const

Equality operators

bool operator>= ( const Time time  )  const

Equality operators

bool operator>= ( double  time  )  const

Equality operators


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

Last updated Aug 04 2007