Skip to content

Commit

Permalink
🧪 timePerFrame()
Browse files Browse the repository at this point in the history
  • Loading branch information
astoilkov committed Feb 20, 2024
1 parent fb03a1a commit 367fd4a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions playground/utils/fps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ class FPS {
this.#loop()
}

timePerFrame(): number {
return 1000 / this.fps()
}

fps(): number {
if (this.#fps === 61) {
return 60
Expand Down

0 comments on commit 367fd4a

Please sign in to comment.