Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eins78/node-hertz
miliseconds from frequency (1000/n)
https://github.com/eins78/node-hertz
Last synced: about 1 month ago
JSON representation
miliseconds from frequency (1000/n)
- Host: GitHub
- URL: https://github.com/eins78/node-hertz
- Owner: eins78
- Created: 2015-01-19T15:58:30.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-10-14T13:41:59.000Z (about 8 years ago)
- Last Synced: 2024-08-10T07:38:14.124Z (5 months ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# *require*("**hertz**")
[![fanart](http://upload.wikimedia.org/wikipedia/commons/e/ea/Wave_frequency.gif)](https://en.wikipedia.org/wiki/Hertz)
sick of writing `setTimeout(fn, (1000/freq))`?
use this:
```js
var hz = require('hertz');
setTimeout(fn, hz(1));
```
### asyncasync version, because `node.js`:
```js
var hz = require('hertz/async');
hz(1, function (err, wait) {
setTimeout(fn, wait);
});
```##### Build Status
Travis: [![travis ci](https://travis-ci.org/eins78/node-hertz.svg)](https://travis-ci.org/eins78/node-hertz)
[![cider ci](http://cider.zrh.kiste.li/cider-ci/ui/public/node-hertz/master/test/summary.svg?respond_width_200)](http://cider.zrh.kiste.li/cider-ci/ui/public/node-hertz/master/test/summary.html)