MCPcopy Create free account
hub / github.com/codecombat/codecombat / startTimer

Function startTimer

ozaria/site/common/logger.js:59–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

57 * Returns -1 if browser didn't support performance API or Date API.
58 */
59export const startTimer = () => {
60 let startingTime
61
62 try {
63 startingTime = getMsTime()
64 } catch (e) {
65 return () => -1
66 }
67
68 return () => getMsTime() - startingTime
69}

Callers

nothing calls this directly

Calls 1

getMsTimeFunction · 0.85

Tested by

no test coverage detected