Loading Blog Search...

Wednesday, August 25, 2004

精确计时LINUX&WINDOWS

IBM Edward G. Bradford LINUX&WINDOWS精确计时比较, windows 精度稍差,效率稍低,不过两者都可以接受。

1 comment:

Li-Zhao 李钊 said...

运行时:Linux 和 Windows 2000上的高性能编程技术
用 QueryPerformanceCounter() 计算秒


LARGE_INTEGER tim, freq;
double seconds;

QueryPerformanceCounter(&tim);
QeryPerformanceFrequency(&freq);
seconds = (double)tim / (double) freq;