Main Page   Class Hierarchy   Compound List   Compound Members  

ArTime Class Reference

A class for time readings. More...

#include <ariaUtil.h>

List of all members.

Public Methods

 ArTime (void)
 Constructor.

 ~ArTime (void)
 Destructor.

long mSecSince (ArTime since)
 Gets the number of milliseconds since the given timestamp to this one.

long secSince (ArTime since)
 Gets the number of seconds since the given timestamp to this one.

long mSecTo (void)
 Finds the number of millisecs from when this timestamp is set to to now.

long secTo (void)
 Finds the number of seconds from when this timestamp is set to to now.

long mSecSince (void)
 Finds the number of milliseconds from this timestamp to now.

long secSince (void)
 Finds the number of seconds from when this timestamp was set to now.

bool isBefore (ArTime testTime)
 returns whether the given time is before this one or not.

bool isAt (ArTime testTime)
 returns whether the given time is equal to this time or not.

bool isAfter (ArTime testTime)
 returns whether the given time is after this one or not.

void setToNow (void)
 Sets the time to now.

void addMSec (long ms)
 Add some milliseconds (can be negative) to this time.

void setSec (time_t sec)
 Sets the seconds since 1970.

void setMSec (time_t msec)
 Sets the milliseconds.

time_t getSec (void)
 Gets the seconds since 1970.

time_t getMSec (void)
 Gets the milliseconds.

void print (void)
 Logs the time.


Detailed Description

A class for time readings.

This class is for getting the time of certain events. This class is not for generic time stuff, just for timeStamping, hence the only commands are very simple and the accessors for getting the data directly shouldn't really be used. DON'T use this for keeping track of what time it is, its just for relative timing (ie this loop needs to sleep another 100 ms);


The documentation for this class was generated from the following file:
Generated on Tue Nov 12 17:44:07 2002 for Aria by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001