Comparing version 0.2.0 to 0.2.1
@@ -20,2 +20,3 @@ var S = 'seconds'; | ||
if(unit === NS) time = msTime * 1000; | ||
if(!time) time = msTime; | ||
@@ -22,0 +23,0 @@ return parseInt(time * 100, 10) / 100; |
{ | ||
"name": "hirestime", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "thin wrapper around process.hrtime", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -58,2 +58,8 @@ var expect = require('chai').expect; | ||
it('should return an approximate number of elapsed time in seconds (unknown unit)', function() { | ||
hrtimeMock(100); | ||
var getElapsed = hirestime(); | ||
expect(getElapsed('foo')).to.equal(100); | ||
}); | ||
}); |
5674
73