hertz

1.1.1 • Public • Published

require("hertz")

fanart

sick of writing setTimeout(fn, (1000/freq))?

use this:

var hz = require('hertz');
setTimeout(fn, hz(freq));

async

async version, because node/io.js:

var hz = require('hertz/async');
hz(freq, function (err, wait) {
  setTimeout(fn, wait);
});

Package Sidebar

Install

npm i hertz

Weekly Downloads

2

Version

1.1.1

License

MIT

Last publish

Collaborators

  • eins78