# How to capture FPS in real time?

**URL:** https://phaser.discourse.group/t/how-to-capture-fps-in-real-time/8487
**Category:** Phaser 3
**Created:** [December 29, 2020, 7:27pm UTC](https://phaser.discourse.group/t/how-to-capture-fps-in-real-time/8487 "2020-12-29T19:27:06Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![igorcfreittas](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/igorcfreittas/32/4547_2.png) [@igorcfreittas](https://phaser.discourse.group/u/igorcfreittas)
#### Post date: [December 29, 2020, 7:27pm UTC](https://phaser.discourse.group/t/how-to-capture-fps-in-real-time/8487/1 "2020-12-29T19:27:07Z")

</div>

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);
    });
}

```

---

<div class="post-metadata">

### Author: ![Milton](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@Milton](https://phaser.discourse.group/u/Milton)
#### Post date: [December 30, 2020, 3:39am UTC](https://phaser.discourse.group/t/how-to-capture-fps-in-real-time/8487/2 "2020-12-30T03:39:15Z")

</div>

> **[Phaser 3 API Documentation - Class: Scene](https://photonstorm.github.io/phaser3-docs/Phaser.Scene.html#update)**

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.
