Skip to content

richRemer/bodewell-loop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

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();

About

Execution loop for Bodewell system monitor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published