mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
clarify calculation of process.hrtime
This commit is contained in:
@@ -2,7 +2,9 @@ Settings = require('settings-sharelatex')
|
||||
logger = require('logger-sharelatex')
|
||||
|
||||
deltaMs = (ta, tb) ->
|
||||
return Math.floor(((ta[0]-tb[0])*1e9 + (ta[1]-tb[1]))*1e-6)
|
||||
nanoSeconds = (ta[0]-tb[0])*1e9 + (ta[1]-tb[1])
|
||||
milliSeconds = Math.floor(nanoSeconds*1e-6)
|
||||
return milliSeconds
|
||||
|
||||
module.exports = class Profiler
|
||||
LOG_CUTOFF_TIME: 1000
|
||||
|
||||
Reference in New Issue
Block a user