IBM Edward G. Bradford LINUX&WINDOWS;精确计时比较, windows 精度稍差,效率稍低,不过两者都可以接受。
运行时:Linux 和 Windows 2000上的高性能编程技术用 QueryPerformanceCounter() 计算秒
LARGE_INTEGER tim, freq; double seconds;
QueryPerformanceCounter(&tim;); QeryPerformanceFrequency(&freq;); seconds = (double)tim / (double) freq;
Name (required)
E-mail (required)
URI
Your Comment
You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
运行时:Linux 和 Windows 2000上的高性能编程技术
用 QueryPerformanceCounter() 计算秒
LARGE_INTEGER tim, freq;
double seconds;
QueryPerformanceCounter(&tim;);
QeryPerformanceFrequency(&freq;);
seconds = (double)tim / (double) freq;