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 ()
 Constructors.
 Time (const Time &time)
 Copy constructor.
 Time (const struct timeval &tv)
 Constructor.
 Time (int sec, int usec)
 Constructor.
 Time (double time)
 Constuctor.
virtual ~Time ()
 Destructor.
void SetToWallTime ()
 Set the time to the wall time.
void Set (int sec, int usec)
 Set to sec and usec.
void Set (double seconds)
 Set to seconds.
double Double () const
 Get the time as a double.
const Timeoperator= (const struct timeval &tv)
 Equal opeator.
const Timeoperator= (const Time &time)
 Equal opeator.
Time operator+ (const struct timeval &tv) const
 Addition operators.
const Timeoperator+= (const struct timeval &tv)
 Addition operators.
Time operator+ (const Time &time) const
 Addition operators.
const Timeoperator+= (const Time &time)
 Addition operators.
Time operator- (const struct timeval &tv) const
 Subtraction operator.
const Timeoperator-= (const struct timeval &tv)
 Subtraction operator.
Time operator- (const Time &time) const
 Subtraction operator.
const Timeoperator-= (const Time &time)
 Subtraction operator.
Time operator * (const struct timeval &tv) const
 Multiplication operators.
const Timeoperator *= (const struct timeval &tv)
 Multiplication operators.
Time operator * (const Time &time) const
 Multiplication operators.
const Timeoperator *= (const Time &time)
 Multiplication operators.
Time operator/ (const struct timeval &tv) const
 Division operators.
const Timeoperator/= (const struct timeval &tv)
 Division operators.
Time operator/ (const Time &time) const
 Division operators.
const Timeoperator/= (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.

Static Public Member Functions

static Time GetWallTime ()
 Get the wall time.

Public Attributes

int sec
 Seconds.
int usec
 Microseconds.

Friends

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


Constructor & Destructor Documentation

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


Member Function Documentation

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


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

Last updated Aug 04 2007