3 ms·
Instead of: window.setInterval(frame, 1000); Do: window.setTimeout('window.setInterval(frame, 1000)', 999-(new Date()).getMilliseconds()); That way the
by ars 16y ago
Instead of:
window.setInterval(frame, 1000);
Do:
window.setTimeout('window.setInterval(frame, 1000)', 999-(new Date()).getMilliseconds());
That way the seconds will be properly synchronized.
- vog 16y agoInstead of a string containing code, you should use an anonymous function.