32 #ifndef Time_INCLUDE_ONCE 33 #define Time_INCLUDE_ONCE 56 int year()
const {
return mYear; }
58 int month()
const {
return mMonth; }
64 int hour()
const {
return mHour; }
66 int minute()
const {
return mMinute; }
68 int second()
const {
return mSecond; }
72 static real currentTime();
74 static void sleep(
unsigned int milliseconds);
76 void start(
int index=0) { mStart[index] = currentTime(); }
78 void stop(
int index=0) { mStart[index] = -1.0; }
80 bool isStarted(
int index=0)
const {
return mStart[index] != -1; }
82 real
elapsed(
int index=0)
const {
return mStart[index] >= 0 ? currentTime() - mStart[index] : -1; }
94 real mStart[VL_MAX_TIMERS];
real elapsed(int index=0) const
#define VL_INSTRUMENT_CLASS(ClassName, BaseClass)
Visualization Library main namespace.
Simple class to be used as a timer and to retrieve the current time and date.
The base class for all the reference counted objects.
bool isStarted(int index=0) const