00001 #ifndef TimeCounter_H 00002 #define TimeCounter_H 00003 00004 #include <windows.h> 00005 #include <time.h> 00006 00007 #include <QString> 00008 00009 class TimeCounter { 00010 public: 00011 TimeCounter(QString name); 00012 00013 void start(); 00014 void end(); 00015 00016 private: 00017 LONGLONG startTime; 00018 QString name; 00019 }; 00020 00021 /*void startCounter(); 00022 00023 LONGLONG __cdecl TimeCounter_read(); 00024 LONGLONG TimeCounter_init(); 00025 LONGLONG TimeCounter_getDiffInUs(LONGLONG countEnd, LONGLONG countStart); 00026 LONGLONG TimeCounter_getDiffInMs(LONGLONG countEnd, LONGLONG countStart); 00027 char* TimeCounter_toUsString(LONGLONG count); 00028 char* TimeCounter_toMsString(LONGLONG count);*/ 00029 00030 #endif // TimeCounter_H