f,g:float;\r
o:tosversioninfo;\r
isnt:boolean;\r
- is9x:boolean;\r
+{ is9x:boolean;}\r
begin\r
if (performancecountfreq = 0) then qpctimefloat;\r
ticks_freq_known := false;\r
o.dwOSVersionInfoSize := sizeof(o);\r
getversionex(o);\r
isnt := o.dwPlatformId = VER_PLATFORM_WIN32_NT;\r
- is9x := o.dwPlatformId = VER_PLATFORM_WIN32_WINDOWS;\r
+{ is9x := o.dwPlatformId = VER_PLATFORM_WIN32_WINDOWS;}\r
\r
ticks_freq2 := f;\r
mmtime_synchedqpc := false;\r
maxretries=5;\r
margin=0.002;\r
var\r
- jump:float;\r
- mm,f,qpc,newdrift,f1,f2:float;\r
+{ jump:float;}\r
+ mm,f,qpc,newdrift:float;\r
qpcjumped:boolean;\r
- a,b,c:integer;\r
- retrycount:integer;\r
+ a,b:integer;\r
+{ retrycount:integer;}\r
begin\r
if not ticks_freq_known then measure_ticks_freq;\r
- retrycount := maxretries;\r
+{ retrycount := maxretries;}\r
\r
qpc := qpctimefloat;\r
mm := mmtimefloat;\r
mmtime_prev_lastsyncqpc := mmtime_lastsyncqpc;\r
\r
mm := mmtimefloat;\r
- dec(retrycount);\r
+ { dec(retrycount);}\r
settc;\r
result := qpctimefloat;\r
f := mmtimefloat;\r
{ mmtime_drift := mmtime_drift + mmtime_driftavg[a];}\r
end;\r
{ mmtime_drift := mmtime_drift / b;}\r
+ a := 5;\r
if (b = 1) then a := 5 else if (b = 2) then a := 15 else if (b = 3) then a := 30 else if (b = 4) then a := 60 else if (b = 5) then a := 120 else if (b >= 5) then a := 120;\r
mmtime_nextdriftcorrection := qpc + a;\r
if (b >= 2) then warmup_finished := true;\r
qpc := qpctimefloat;\r
\r
result := (qpc - mmtime_lastsyncqpc) * mmtime_drift + mmtime_lastsyncmm;\r
- f := (qpc - mmtime_prev_lastsyncqpc) * mmtime_prev_drift + mmtime_prev_lastsyncmm;\r
\r
+ {f := (qpc - mmtime_prev_lastsyncqpc) * mmtime_prev_drift + mmtime_prev_lastsyncmm;\r
jump := result-f;\r
- {writeln('jump ',formatfloat('0.000000',jump),' drift ',formatfloat('0.00000000',mmtime_drift),' duration ',formatfloat('0.000',(mmtime_lastsyncqpc-mmtime_prev_lastsyncqpc)),' ',formatfloat('0.00000000',jump/(mmtime_lastsyncqpc-mmtime_prev_lastsyncqpc)));}\r
+ writeln('jump ',formatfloat('0.000000',jump),' drift ',formatfloat('0.00000000',mmtime_drift),' duration ',formatfloat('0.000',(mmtime_lastsyncqpc-mmtime_prev_lastsyncqpc)),' ',formatfloat('0.00000000',jump/(mmtime_lastsyncqpc-mmtime_prev_lastsyncqpc)));}\r
\r
f := result;\r
end;\r