source: imaps-frontend/node_modules/performance-now/src/performance-now.coffee@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 553 bytes
Line 
1if performance? and performance.now
2 module.exports = -> performance.now()
3else if process? and process.hrtime
4 module.exports = -> (getNanoSeconds() - nodeLoadTime) / 1e6
5 hrtime = process.hrtime
6 getNanoSeconds = ->
7 hr = hrtime()
8 hr[0] * 1e9 + hr[1]
9 moduleLoadTime = getNanoSeconds()
10 upTime = process.uptime() * 1e9
11 nodeLoadTime = moduleLoadTime - upTime
12else if Date.now
13 module.exports = -> Date.now() - loadTime
14 loadTime = Date.now()
15else
16 module.exports = -> new Date().getTime() - loadTime
17 loadTime = new Date().getTime()
Note: See TracBrowser for help on using the repository browser.