ML Reference
|
00001 // **InsertLicense** code 00002 //-------------------------------------------------------------------------------------- 00004 00009 //-------------------------------------------------------------------------------------- 00010 #ifndef __mlTimeCounter_H 00011 #define __mlTimeCounter_H 00012 00013 #ifndef __mlUtilsSystem_H 00014 #include "mlUtilsSystem.h" 00015 #endif 00016 00017 ML_UTILS_START_NAMESPACE 00018 00019 //-------------------------------------------------------------------------------------- 00021 //-------------------------------------------------------------------------------------- 00022 class TimeCounter 00023 { 00024 00025 public: 00026 00028 ML_UTILS_EXPORT TimeCounter(); 00029 00031 ML_UTILS_EXPORT TimeCounter(const TimeCounter& originalCount); 00032 00034 ML_UTILS_EXPORT TimeCounter& operator=(const TimeCounter& originalCount); 00035 00036 00038 ML_UTILS_EXPORT void reset(); 00039 00040 00042 ML_UTILS_EXPORT MLdouble getStartValueInCounts() const; 00043 00045 ML_UTILS_EXPORT MLdouble getCurrentValueInCounts() const; 00046 00048 ML_UTILS_EXPORT MLdouble getRunningTimeInCounts() const; 00049 00050 00052 ML_UTILS_EXPORT MLdouble getStartValueInSeconds() const; 00053 00055 ML_UTILS_EXPORT MLdouble getCurrentValueInSeconds() const; 00056 00058 ML_UTILS_EXPORT MLdouble getRunningTimeInSeconds() const; 00059 00060 00062 ML_UTILS_EXPORT static MLdouble getCountResolutionInSeconds(); 00063 00064 protected: 00065 00067 MLdouble _start; 00068 }; 00069 00070 ML_UTILS_END_NAMESPACE 00071 00072 #endif // __mlTimeCounter_H 00073 00074 00075 00076