How to capture FPS in real time?

Hello everyone, I am trying to recover the current FPS within the game, I tried to use the method below, but even changing the FPS within the arcade: {fps: 10} configuration, the method always shows another number, it is possible to recover the current FPS correctly?

getFPS() {

    let prevTime = Date.now(),
    frames = 0;

    requestAnimationFrame(function loop() {
        const time = Date.now();
        frames++;
        if (time > prevTime + 1000) {
            let fps = Math.round( ( frames * 1000 ) / ( time - prevTime ) );
            prevTime = time;
            frames = 0;

            console.info('FPS: ', fps);
        }

        requestAnimationFrame(loop);
    });
}

update(time, delta)
The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.

Arcade FPS has nothing to do with overall game fps, just it’s internal timestep.

Most browsers have their own FPS meters too.