相关代码 |
|
#include #include "timer.h" #pragma comment(lib, "kernel32.lib") int main() { int lst = GetTickCount(), now; /*for(int k = 0; k < 10; ++k) { TIMER.Reset(); // while((now = GetTickCount()) == lst); //for(int j =0 ; j < 5; ++j); TIMER.Report(); lst = now; }*/ for(int i = 0; i < 1e9; ++i); Sleep(10000); for(i = 0; i < 1e9; ++i); return 0; }