Measures event frequency
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
tests
.gitignore
.travis.yml
README.md
index.js
package.json

README.md

Frequency Meter Build Status

Measures the frequency of events.

Install

$ npm isntall frequency-meter

Use

Require:

var FM = require('frequency-meter');

Construct:

var fm = FM();

or construct with target emit interval (defaults to 1 second):

var fm = FM(5000); // 5 seconds

Feed it events:

setInterval(function() {
  fm.happened();
}, 100);

And listen for frequency updates:

fm.on('frequency', function(freq) {
  console.log('frequency is', freq);
});

End it:

fm.end();

License

MIT