From 3dd5a60c6c89a29781e099a9e204b09ffbb2e317 Mon Sep 17 00:00:00 2001 From: beware Date: Sun, 15 Apr 2018 18:57:57 +0000 Subject: [PATCH] allow opt out of win8 api method for program that needs old method git-svn-id: file:///svnroot/lcore/trunk@152 b1de8a11-f9be-4011-bde0-cc7ace90066a --- btime.pas | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/btime.pas b/btime.pas index 87801b5..46cdf48 100644 --- a/btime.pas +++ b/btime.pas @@ -36,6 +36,7 @@ var tickcount:integer; settimebias:tunixtimeint; performancecountfreq:extended; + btimenowin8:boolean; function irctimefloat:float; function irctimeint:tunixtimeint; @@ -598,10 +599,12 @@ const var f,g,h:float; begin - if not win8inited then initwin8; - if assigned(@GetSystemTimePreciseAsFileTime) then begin - result := unixtimefloat_win8; - exit; + if not btimenowin8 then begin + if not win8inited then initwin8; + if assigned(@GetSystemTimePreciseAsFileTime) then begin + result := unixtimefloat_win8; + exit; + end; end; result := monotimefloat+timefloatbias; -- 2.30.2