#include <BALL/CONCEPT/timeStamp.h>
Public Member Functions | |
Constructors and Destructors. | |
PreciseTime () | |
PreciseTime (const PreciseTime &time) | |
PreciseTime (long secs, long usecs) | |
virtual | ~PreciseTime () |
Assignment | |
void | set (long secs, long usecs) |
void | set (const PreciseTime &time) |
const PreciseTime & | operator= (const PreciseTime &time) |
virtual void | clear () |
Predicates | |
bool | operator< (const PreciseTime &time) const |
bool | operator> (const PreciseTime &time) const |
bool | operator== (const PreciseTime &time) const |
Storable interface. | |
void | write (PersistenceManager &pm) const |
bool | read (PersistenceManager &pm) |
Static Public Attributes | |
Constants. | |
static const PreciseTime | ZERO |
Protected Attributes | |
long | secs_ |
long | usecs_ |
Accessors | |
long | getSeconds () const |
long | getMicroSeconds () const |
static PreciseTime | now () |
Time class. Used to store a point of time. This class provides a higher precision than Time (below seconds).
Storable
BALL::PreciseTime::PreciseTime | ( | ) |
Default constructor. Initialize with zero.
BALL::PreciseTime::PreciseTime | ( | const PreciseTime & | time | ) |
Copy constructor
BALL::PreciseTime::PreciseTime | ( | long | secs, | |
long | usecs | |||
) |
Detailed constructor
virtual BALL::PreciseTime::~PreciseTime | ( | ) | [virtual] |
Destructor
virtual void BALL::PreciseTime::clear | ( | ) | [virtual] |
Clear method
long BALL::PreciseTime::getMicroSeconds | ( | ) | const |
Return the microseconds.
long BALL::PreciseTime::getSeconds | ( | ) | const |
Return the seconds since Jan. 1, 1970.
static PreciseTime BALL::PreciseTime::now | ( | ) | [static] |
Return the current time.
bool BALL::PreciseTime::operator< | ( | const PreciseTime & | time | ) | const |
Greater than operator.
const PreciseTime& BALL::PreciseTime::operator= | ( | const PreciseTime & | time | ) |
Assignment operator
bool BALL::PreciseTime::operator== | ( | const PreciseTime & | time | ) | const |
Equality operator.
bool BALL::PreciseTime::operator> | ( | const PreciseTime & | time | ) | const |
Lesser than operator.
bool BALL::PreciseTime::read | ( | PersistenceManager & | pm | ) |
Persistent stream reading. This method reads the contents of a PreciseTime object from the persistent stream using the readPrimitive
method of the PersistenceManager.
pm | the persistence manager |
void BALL::PreciseTime::set | ( | const PreciseTime & | time | ) |
Assignment method
void BALL::PreciseTime::set | ( | long | secs, | |
long | usecs | |||
) |
Assignment method
void BALL::PreciseTime::write | ( | PersistenceManager & | pm | ) | const |
Persistent stream writing. This method writes the contents of the PreciseTime objects to the persistent stream using the writePrimitive
method of the PersistenceManager.
pm | the persistence manager |
long BALL::PreciseTime::secs_ [protected] |
long BALL::PreciseTime::usecs_ [protected] |
const PreciseTime BALL::PreciseTime::ZERO [static] |
Zero object.