⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 uc_timer.h

📁 This package consists of the executable (UCW), a default script file, this file, and the library fi
💻 H
字号:
// UC_TIMER.H

#ifndef __UC_TIMER_H
#define __UC_TIMER_H

// import GetTickCount()  (no of msec since begining of session)
#lib kernel32.dll
extern "C" {
__API unsigned long GetTickCount();
}
#lib

class Timer {
  unsigned long m_start;
  char* m_msg;
public:
   Timer() { }
   void start(char* msg) { 
     m_msg = msg;
     m_start = GetTickCount();
   }
   void stop() {
     unsigned long elapsed = GetTickCount() - m_start;
     printf("%s: time %lf sec\n",m_msg,elapsed/1000.0);
   }
 };

#endif


  

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -