allow opt out of win8 api method for program that needs old method
[lcore.git] / 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