MutekiTimer

A stable timer that run in the background

Demo

You can see when switch to another browser's tab and back to this page.
muteki.setInterval:0
window.setInterval:0

How to Use

// use a MutekiTimer object

t = new MutekiTimer();

t.setInterval(function() {
  // processing
}, 150);
t.clearInterval();
// replace window.setInterval

MutekiTimer.use();

t = setInterval(function() {
  // processing
}, 150);
clearInterval(t);
// check if MutekiTimer is enabled

MutekiTimer.isEnabled();






Fork me on GitHub