Phaser cycle interval how to write a faster and faster

var appleTimer = game.time.create (true);
appleTimer.loop (1000, function () {
})
how can I let the loop cycle time not be fixed at 1000, but get faster over time

May.16,2021

you can use timing recursion, for example:

var timeout = 1000;
function test () {

setTimeout(function() {
    // do some thing
    if () {
        test();
    } else {
        // 
    }        
}, timeout);
timeout = timeout <= 200 ? 200 : timeout - 50;

}

/ / Let it run
test ();

Menu