rendered paste body<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>FPS Counter</title></head><body><script type="text/javascript">var setupFps = function(){var lastTime = new Date();var hits = 0;var fps = Waiting;var hit = function(){hits++;var nowTime = new Date();if (nowTime.getTime() lastTime.getTime() > 1000){var dt = nowTime.getTime() lastTime.getTime();fps = + Math.round(hits * 1000 / dt);hits = 0;lastTime = nowTime;}return fps;};return hit;};</script><script type="text/javascript">var hit = setupFps();var render = function(){ctx.fillStyle = #333333;ctx.beginPath();ctx.rect(0, 0, width, height);ctx.closePath();ctx.fill();ctx.fillStyle = #ffffff;ctx.fillText(hit(), 30, 30);};</script><div id="hit"></div></body></html>