You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar to #1765, where we stop shadowing the haxe.io.Bytes class, we should also stop shadowing haxe.Timer. Future changes to Haxe's official implementation of haxe.Timer could cause our custom implementation to completely break or to diverge in functionality. We can probably tweak our implementation to handle those changes, if they happen, but if we weren't shadowing things in the Haxe standard library in the first place, that wouldn't even be a concern.
I don't have a specific suggestion for how to do it right now, but I wanted to have a single issue to reference and consolidate discussion and notes.
There was some discussion about our shadowed haxe.Timer on the Haxe Discord in February 2024. Zeta (Apprentice-Alchemist) mentioned the following, and I wanted to save it somewhere because searching Discord for old discussions is terrible.
#if ( target.threaded && (haxe_ver >= 4.2) )
// Due to how 4.2+ timers work, instead of MainLoop, thread events have to be updated.// Unsafe events rely on internal implementation of EventLoop, but utilize the recycling feature// which in turn provides better optimization.
#if heaps_unsafe_events
@:privateAccessmainThread.events.__progress(Sys.time(), eventRecycle);
#else
mainThread.events.progress();
#end
#else
@:privateAccesshaxe.MainLoop.tick();
#end
The text was updated successfully, but these errors were encountered:
I discovered that Lime's custom haxe.Timer implementation causes openfl.utils.Timer to behave differently than flash.utils.Timer. Lime limits haxe.Timer to the frame rate, but flash.utils.Timer is allowed to update more frequently than flash.events.Event.ENTER_FRAME is dispatched.
In Flash, you can set the stage frame rate to a low value, like 1 FPS, but then call TimerEvent.updateAfterEvent() to force a rendering update on demand. Because Lime and OpenFL's Timers are limited to the frame rate, this (admittedly advanced) use case is not possible in OpenFL, like it is in Flash.
Similar to #1765, where we stop shadowing the
haxe.io.Bytes
class, we should also stop shadowinghaxe.Timer
. Future changes to Haxe's official implementation ofhaxe.Timer
could cause our custom implementation to completely break or to diverge in functionality. We can probably tweak our implementation to handle those changes, if they happen, but if we weren't shadowing things in the Haxe standard library in the first place, that wouldn't even be a concern.I don't have a specific suggestion for how to do it right now, but I wanted to have a single issue to reference and consolidate discussion and notes.
There was some discussion about our shadowed
haxe.Timer
on the Haxe Discord in February 2024. Zeta (Apprentice-Alchemist) mentioned the following, and I wanted to save it somewhere because searching Discord for old discussions is terrible.The text was updated successfully, but these errors were encountered: