Get current time in microseconds (cross-environment)

npm install microtime-x
3 downloads in the last day
23 downloads in the last week
110 downloads in the last month

microtime-x - Get current time in microseconds (cross-environment solution)

Returns the number of microseconds elapsed since 1 January 1970 00:00:00 UTC

In browser relies on performance.now or it's engine specific variant if available, in Node.js microtime by Wade Simmons is used (if supported). If none of the mentioned works then Date.now() result multiplied by 1000 is returned



In your project path:

$ npm install microtime-x


You can easily bundle npm packages for browser with modules-webmake

Tests Build Status

$ npm test
npm loves you