hertz
1.1.1 • Public • Published require("hertz")
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
Weekly Downloads