gatb.core-API-0.0.0
|
Interface that provides methods returning time information. More...
#include <ITime.hpp>
Public Types | |
typedef u_int64_t | Value |
Public Member Functions | |
virtual Value | getTimeStamp ()=0 |
virtual Unit | getUnit ()=0 |
virtual std::string | getDateString ()=0 |
virtual | ~ITime () |
Interface that provides methods returning time information.
This interface mainly defines an operation that returns a time stamp, according to the beginning of the current process.
The unit of the returned value may depend on the implementation. It could be second, millisecond and so on, or we can also use a unit independent of time, like the number of CPU cycles, which may be interesting for comparing the same test on different machines with different clock frequencies.
typedef u_int64_t Value |
Alias for the possible values for time stamping. Note that we use a large integer because we may have huge values in case we use the CPUCLOCK unit (for instance, value=2000000000 for one second with CPU frequency of 2 GHz).
|
inlinevirtual |
Destructor.
|
pure virtual |
Get a string holding information about the current date.
Implemented in TimeAbstract.
|
pure virtual |
Returns a time stamp, ie the number of time atoms (depending on chosen time unit) since some define T0 time. Such a starting time can be the 01.01.1970 for instance, or the beginning of the process. It implies that clients should be interested not in the absolute value returned by the method but by the distance between two such values.
Implemented in TimeCycle, and TimeSystem.
|
pure virtual |
Implemented in TimeAbstract.