Openfl.Lib.getTimer() returns negative values(html5 target)

haxe: 3.2.0
lime: 2.4.1 2.4.2 [2.4.3]
openfl: 3.0.6 3.0.7 [3.0.8]
Checking code:

function onEnterFrame(e: Event)
{
    trace("time = ",  Lib.getTimer() );
}

Probably it is related to haxe-generated javascript code for Std.int(), it will be something like:

(new Date()).valueOf() | 0

While it will actually convert float to int, as side-effect it will convert to Int32.
I’m not sure if it was expected or it is a regression, but in my projects I started to use

haxe.Timer.stamp()

because it not try to convert Float to Int.
If you want to migrate from openfl.Lib.getTimer() to haxe.Timer.stamp() in existing project, just multiply haxe.Timer.stamp() by 1000 (and use Float instead of Int for variables).

I just fixed the negative timer value in JS, it should be positive now :wink: