Get frames per second?

I know you can display fps using playdate.drawFPS but is there a function to return the current fps as an integer?

Sadly not, though it has been requested previously.

1 Like

How would I go about doing that?

Using playdate.getCurrentTimeMilliseconds() ? And keeping track of the previous frames time in milliseconds?

Does getCurrentTime account for frame drops?

I've edited/removed my recommendation. Not sure it's applicable.

I manage framerate myself, after setting the system to zero (unlocked/unlimited) so I have to calculate the rolling average.

But yes I think for you if you compare seconds to a count of frames you can maybe get something useful?

1 Like

We're planning to add a get_fps() function in the next SDK update.


That's good. I'll see if I can figure something out in the meantime...

Is this still on the way? Its been a couple months since the last SDK update & I'd love to be able to get the current FPS