Logs Automatically purges themselves

This commit is contained in:
Luis Fernando Molina committed 2018-03-17 17:04:07 +01:00
1 parent fda24f934c
commit a42174b233
632 files changed
+19952 -20039

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
// This file describes the package to typescript.
/**
* Returns the number of milliseconds since the page was loaded (if browser)
* or the node process was started.
*/
declare function now(): number;
export = now;
+4 -2
View File
@@ -1,12 +1,14 @@
if performance? and performance.now
module.exports = -> performance.now()
else if process? and process.hrtime
module.exports = -> (getNanoSeconds() - loadTime) / 1e6
module.exports = -> (getNanoSeconds() - nodeLoadTime) / 1e6
hrtime = process.hrtime
getNanoSeconds = ->
hr = hrtime()
hr[0] * 1e9 + hr[1]
loadTime = getNanoSeconds()
moduleLoadTime = getNanoSeconds()
upTime = process.uptime() * 1e9
nodeLoadTime = moduleLoadTime - upTime
else if Date.now
module.exports = -> Date.now() - loadTime
loadTime = Date.now()