Skip to content

Instantly share code, notes, and snippets.

View AfterAllDev's full-sized avatar
☀️

Jason AfterAllDev

☀️
View GitHub Profile
@AfterAllDev
AfterAllDev / fps.js
Created November 28, 2024 15:25
Polls refresh rate for a second, once the window has focus, after a 1 second delay, then emits an event called "fpsCheck"
(function (window) {
// Usage:
// document.addEventListener(
// 'fpsCheck',
// (e) => {
// console.log(e.detail);
// }
// );
function measureFps() {