From 92166f018e1f4c7e589d3241d612e6a7cc39f3ed Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Wed, 25 Mar 2015 17:50:03 -0700 Subject: [PATCH] Patch haxe.Timer --- haxe/Timer.hx | 8 ++++++-- lime/app/Application.hx | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/haxe/Timer.hx b/haxe/Timer.hx index 604a74d3e..344eb7202 100644 --- a/haxe/Timer.hx +++ b/haxe/Timer.hx @@ -243,7 +243,11 @@ class Timer { private static function getMS ():Float { - return stamp () * 1000.0; + #if lime_legacy + return lime_time_stamp () * 1000.0; + #else + return System.getTimer (); + #end } @@ -298,7 +302,6 @@ class Timer { } - #if lime_legacy @:noCompletion private function __check (inTime:Float) { if (inTime >= mFireAt) { @@ -340,6 +343,7 @@ class Timer { } + #if lime_legacy @:noCompletion public static function __nextWake (limit:Float):Float { var now = lime_time_stamp () * 1000.0; diff --git a/lime/app/Application.hx b/lime/app/Application.hx index 01b06a4f4..3bac8f75d 100644 --- a/lime/app/Application.hx +++ b/lime/app/Application.hx @@ -1,6 +1,7 @@ package lime.app; +import haxe.Timer; import lime.graphics.Renderer; import lime.graphics.RenderContext; import lime.ui.Gamepad; @@ -513,6 +514,8 @@ class Application extends Module { public override function update (deltaTime:Int):Void { + Timer.__checkTimers (); + for (module in modules) { module.update (deltaTime);