Explorar o código

added stamp()

Nicolas Cannasse %!s(int64=19) %!d(string=hai) anos
pai
achega
a92ee20675
Modificáronse 1 ficheiros con 11 adicións e 0 borrados
  1. 11 0
      std/haxe/Timer.hx

+ 11 - 0
std/haxe/Timer.hx

@@ -78,4 +78,15 @@ class Timer {
 		};
 	}
 
+	public static function stamp() : Float {
+		#if flash
+		return flash.Lib.getTimer() / 1000;
+		#else neko
+		return neko.Sys.time();
+		#else js
+		return Date.now().getTime() / 1000;
+		#else error
+		#end
+	}
+
 }