I notice some strange delays on Event.ENTER_FRAME events
To reproduce problem I use latest BunnyMark example, and add these changes:
- Remove all bunnys except one
- add variable
private var prev_t : Float = 0.0;
- change function stage_onEnterFrame to this function
private function stage_onEnterFrame (event:Event):Void {
var t:Float = Timer.stamp();
if ( t - prev_t > 0.03 ) {
trace(t + " : " + (t - prev_t));
}
bunnies[0].x += 0.00;
prev_t = Timer.stamp();
}
trace give me this log:
BunnyMark.js:7309 Main.hx:92: 0.3595999999670312 : 0.03969999996479601
BunnyMark.js:7309 Main.hx:92: 3.6907999999821186 : 0.04989999998360872
BunnyMark.js:7309 Main.hx:92: 7.057700000004843 : 0.050500000012107193
BunnyMark.js:7309 Main.hx:92: 8.40659999998752 : 0.03220000001601875
BunnyMark.js:7309 Main.hx:92: 8.44109999993816 : 0.033300000010058284
BunnyMark.js:7309 Main.hx:92: 10.224300000001676 : 0.03359999996609986
BunnyMark.js:7309 Main.hx:92: 13.590699999942444 : 0.05009999999310821
.....
so at random time (each 3-4 seconds) i see delay between calls stage_onEnterFrame much more then 0.015 (standart for FPS=60)
But if comment this line:
//bunnies[0].x += 0.00;
then no random delays in log, each delay between calls of stage_onEnterFrame about 0.015 seconds.
What is it? Is some one can reproduce this?
I use Windows10, Chrome 64.0.3282.140, lime [6.1.0], openfl [7.1.1].