Skip to content

Does FXGL have a built in FPS counter display? #1358

Closed Answered by AlmasB
Triangle345 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Triangle345

A few calls exist that may help, depending on the purpose

// time per frame (in this frame) in seconds
FXGL.tpf();

"1.0 / tpf" will provide an adjusted FPS, which is not totally accurate yet but should work for most cases

// how long CPU took to run this frame in nanoseconds
FXGL.cpuNanoTime()

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Triangle345
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants