0.0.1 • Published 7 years ago
bodewell-loop v0.0.1
Bodewell Loop
This package exports the Bodewell Loop
class used by the Bodewell server and
related plugins to execute a function in a loop.
const Loop = require("bodewell-loop");
const doWork = require("my-function-returning-Promise");
var loop = new Loop(doWork);
loop.start();
loop.changeInterval(10000); // run no more than every 10,000 milliseconds
// trigger the loop if between runs
loop.now();
// shutdown the loop
loop.stop();
0.0.1
7 years ago