We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de96ce5 commit 7ca5a69Copy full SHA for 7ca5a69
index.js
@@ -3,7 +3,6 @@
3
*/
4
5
var assert = require('assert');
6
-var microtime = require('microtime');
7
8
/**
9
* Expose `Limiter`.
@@ -61,7 +60,7 @@ Limiter.prototype.get = function (fn) {
61
60
var duration = this.duration;
62
var max = this.max;
63
var db = this.db;
64
- var now = microtime.now();
+ var now = Date.now() * 1000 + Math.floor((process.hrtime()[1] / 1000) % 1000);
65
var start = now - duration * 1000;
66
67
db.multi()
package.json
@@ -9,9 +9,7 @@
"limiter",
10
"limit"
11
],
12
- "dependencies": {
13
- "microtime": "^2.1.2"
14
- },
+ "dependencies": {},
15
"devDependencies": {
16
"ioredis": "1.15.1",
17
"mocha": "*",
0 commit comments