diff --git a/haxe/Timer.hx b/haxe/Timer.hx index 344eb7202..73d1d0372 100644 --- a/haxe/Timer.hx +++ b/haxe/Timer.hx @@ -1,5 +1,5 @@ package haxe; -#if (macro || (!neko && !cpp)) +#if (macro || (!neko && !cpp && !nodejs)) // Original haxe.Timer class diff --git a/lime/_backend/native/NativeApplication.hx b/lime/_backend/native/NativeApplication.hx index 480ae09de..804d0f4b1 100644 --- a/lime/_backend/native/NativeApplication.hx +++ b/lime/_backend/native/NativeApplication.hx @@ -1,6 +1,7 @@ package lime._backend.native; +import haxe.Timer; import lime.app.Application; import lime.app.Config; import lime.audio.AudioManager; @@ -260,6 +261,8 @@ class NativeApplication { private function handleUpdateEvent ():Void { + Timer.__checkTimers (); + parent.onUpdate.dispatch (updateEventInfo.deltaTime); } diff --git a/lime/app/Application.hx b/lime/app/Application.hx index 3bac8f75d..01b06a4f4 100644 --- a/lime/app/Application.hx +++ b/lime/app/Application.hx @@ -1,7 +1,6 @@ package lime.app; -import haxe.Timer; import lime.graphics.Renderer; import lime.graphics.RenderContext; import lime.ui.Gamepad; @@ -514,8 +513,6 @@ class Application extends Module { public override function update (deltaTime:Int):Void { - Timer.__checkTimers (); - for (module in modules) { module.update (deltaTime);