Calculate FPS in Canvas using requestAnimationFrame
Do not use new Date() This API has several flaws and is only useful for getting the current date + time. Not for measuring timespans. The Date-API uses the operating system’s internal clock, which is constantly updated and synchronized with NTP time servers. This means, that the speed / frequency of this clock is sometimes … Read more