浏览代码

[java] use float division for Sys.time (closes #4461)

Some time in the far future, this will cause issues, since double can't contain full long range, but let's leave this for future generations :-P
Dan Korostelev 9 年之前
父节点
当前提交
041df79697
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      std/java/_std/Sys.hx

+ 1 - 1
std/java/_std/Sys.hx

@@ -144,7 +144,7 @@ using haxe.Int64;
 
 	public static function time() : Float
 	{
-		return cast(System.currentTimeMillis().div(Int64.ofInt(1000)), Float);
+		return cast(System.currentTimeMillis(), Float) / 1000;
 	}
 
 	public static function cpuTime() : Float