allow opt out of win8 api method for program that needs old method
authorbeware <beware@bircd.org>
Sun, 15 Apr 2018 18:57:57 +0000 (18:57 +0000)
committerbeware <beware@bircd.org>
Sun, 15 Apr 2018 18:57:57 +0000 (18:57 +0000)
git-svn-id: file:///svnroot/lcore/trunk@152 b1de8a11-f9be-4011-bde0-cc7ace90066a

btime.pas

index 87801b5416e3abba52d62e3832d7a3c59dc92ae6..46cdf48a74189538993306a5985bd3fa7fa996c2 100644 (file)
--- a/btime.pas
+++ b/btime.pas
@@ -36,6 +36,7 @@ var
   tickcount:integer;\r
   settimebias:tunixtimeint;\r
   performancecountfreq:extended;\r
+  btimenowin8:boolean;\r
 \r
 function irctimefloat:float;\r
 function irctimeint:tunixtimeint;\r
@@ -598,10 +599,12 @@ const
 var\r
   f,g,h:float;\r
 begin\r
-  if not win8inited then initwin8;\r
-  if assigned(@GetSystemTimePreciseAsFileTime) then begin\r
-    result := unixtimefloat_win8;\r
-    exit;\r
+  if not btimenowin8 then begin\r
+    if not win8inited then initwin8;\r
+    if assigned(@GetSystemTimePreciseAsFileTime) then begin\r
+      result := unixtimefloat_win8;\r
+      exit;\r
+    end;  \r
   end;\r
 \r
   result := monotimefloat+timefloatbias;\r