| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
GetProcessTimes精度……100144*100nanosecondsIn Reply To:现在用的是GetProcessTimes Posted by:hawk at 2005-03-25 08:15:15 10ms左右吧,我觉得不如用QueryPerformance*那两个,算时间还方便
_controlfp(PC_64, MCW_PC);
static double _180 = 180.0;
__asm
{
fldpi
fdiv qword ptr [_180];
mov ecx, 1090000
fldz
_Loop:
fld st
fsincos
fstp qword ptr [_180]
fstp qword ptr [_180]
fadd st, st(1)
loop _Loop
fstp qword ptr [_180]
fstp qword ptr [_180]
}
这样一段程序,GPT不是0.240就是0.250,QPT是0.242和0.243。
而且在某些情况下,跑了2秒GPT也会返回0
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator