Created
November 3, 2014 21:17
-
-
Save isRuslan/02e9f0d00949f87710ad to your computer and use it in GitHub Desktop.
Date timer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* When it was happend? | |
* https://github.com/zhukov/webogram/blob/master/app/js/lib/utils.js#L8 | |
* console.log(dT(), 'foo'); | |
* [17.567] foo | |
* console.log(dT(), 'bar'); | |
* [23.290] bar | |
*/ | |
var _logTimer = (new Date()).getTime(); | |
function dT () { | |
return '[' + (((new Date()).getTime() - _logTimer) / 1000).toFixed(3) + ']'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment