2.0.0 • Published 4 years ago

@umweltdk/heartbeat v2.0.0

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

Heartbeat

Simple heartbeat module for typescript

Usage

import { Heartbeat } from  '@umweltdk/heartbeat';

const  h = new  Heartbeat(1000, () => {
	//callback
});

h.start();
...
h.stop();

intervalDefinition can be both of type number or string. If number is used, the build-in function setInterval will be used. In case of type string cron will be used, and the string must therefore be a valid cron string.