mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
clarify calculation of process.hrtime
This commit is contained in:
parent
e00f4dde8e
commit
95596061d4
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue