From: beware <beware@bircd.org>
Date: Sun, 15 Apr 2018 18:57:57 +0000 (+0000)
Subject: allow opt out of win8 api method for program that needs old method
X-Git-Url: http://www.lcore.org/git/lcore.git/commitdiff_plain/3dd5a60c6c89a29781e099a9e204b09ffbb2e317?ds=inline

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
---

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;