Time Struct Reference
[sim]

Simple structure for object-oriented handling of timevals. More...

#include <simlpy/Time.h>

List of all members.

Public Member Functions

 Time (const struct timeval &t)
 Constructor from a timeval structure.
 Time (long sec=0, long usec=0)
 Constructor with individual fields.
 Time (const Time &t)
 Copy constructor.
void operator= (const Time &t)
 Assignment operator.
Time operator+ (const Time &t) const
 Add two Times.
Time operator- (const Time &t) const
 Subtract two Times.
Time operator * (long s) const
 Scale by an integer.
Time operator/ (long s) const
 Scale by the inverse of an integer.
bool operator== (const Time &t) const
 Test the equality of two Times.
bool operator< (const Time &t) const
 Less-than operator.
bool operator> (const Time &t) const
 Greater-than operator.
bool operator<= (const Time &t) const
 Less-than-or-equal operator.
bool operator>= (const Time &t) const
 Greater-than-or-equal operator.
Timeoperator+= (const Time &t)
 Add two Times.
Timeoperator-= (const Time &t)
 Subtract two Times.
Timeoperator *= (long s)
 Scale by an integer.
void fix ()
 Make sure the microseconds are less than a million.

Public Attributes

struct timeval tv
 Internal representation.

Static Public Attributes

static const long MILLION = 1000000
 Symbol for a million, so I don't have to count zeroes everywhere.


Detailed Description

Simple structure for object-oriented handling of timevals.

Definition at line 42 of file Time.h.


The documentation for this struct was generated from the following files:
Generated on Mon Mar 24 11:15:48 2008 for Pydtn Simulator by  doxygen 1.5.4