?? gen_usetime.c
字號:
// gen_usetime.c //
#include <windows.h>
#include <stdio.h>
#include <Mmsystem.h>
/**
*
**/
static int runtime;
static int startTime, stopTime;
/***/
void startTimer()
{
startTime = timeGetTime ();
}
/***/
void stopTimer()
{
stopTime = timeGetTime ();
runtime = (stopTime - startTime);
}
/***/
void displayTimer(int picnum)
{
printf ("%d.%02d seconds, %d frames, %d.%02d fps\n",
runtime / 100, runtime % 100,
picnum, ((10000 * picnum + runtime / 2) / runtime) / 100,
((10000 * picnum + runtime / 2) / runtime) % 100);
}
/***/
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -