Browse Source

[hl] fix condition in Timer.milliseconds (#12421)

`hl.Api.timestampMs` is not available on 32-bit
Zeta 1 week ago
parent
commit
8e4f097a9d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      std/haxe/Timer.hx

+ 2 - 2
std/haxe/Timer.hx

@@ -203,7 +203,7 @@ class Timer {
 		#else
 		#else
 		return Std.int(stamp() * 1000);
 		return Std.int(stamp() * 1000);
 		#end
 		#end
-		#elseif (hl && hl_ver >= version("1.16.0"))
+		#elseif (hl && hl_ver >= version("1.16.0") && !hl_legacy32)
 		return hl.Api.timestampMs();
 		return hl.Api.timestampMs();
 		#elseif jvm
 		#elseif jvm
 		return java.lang.System.nanoTime() / 1000000i64;
 		return java.lang.System.nanoTime() / 1000000i64;
@@ -213,4 +213,4 @@ class Timer {
 		return Int64.mul(Int64.fromFloat(stamp()), 1000);
 		return Int64.mul(Int64.fromFloat(stamp()), 1000);
 		#end
 		#end
 	}
 	}
-}
+}