started refac repl to new scheduler + transpiler
This commit is contained in:
parent
c99d957bc8
commit
14c2da4fa2
17 changed files with 5650 additions and 697 deletions
|
|
@ -31,10 +31,11 @@ function createClock(
|
|||
};
|
||||
let intervalID;
|
||||
const start = () => {
|
||||
clear(); // just in case start was called more than once
|
||||
onTick();
|
||||
intervalID = setInterval(onTick, interval * 1000);
|
||||
};
|
||||
const clear = () => clearInterval(intervalID);
|
||||
const clear = () => intervalID !== undefined && clearInterval(intervalID);
|
||||
const pause = () => clear();
|
||||
const stop = () => {
|
||||
tick = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue