jhurliman / node-rate-limiter

A generic rate limiter for node.js. Useful for API clients, web crawling, or other tasks that need to be throttled
MIT License
1.5k stars 132 forks source link

Monotonic Time #22

Closed franciscouzo closed 6 years ago

franciscouzo commented 9 years ago

If the computer's time changes, Date() will be affected, that's why a monotonic time should be used, such as process.hrtime.

jhurliman commented 6 years ago

I'm happy to merge this as long as a fallback is provided for environments that don't have process or process.hrtime