Documentation - v7.17.0
    Preparing search index...

    Function getTimeOrigin

    • Returns the time origin — the start of the current navigation in browsers, or the process start time in Node.js.

      Prefers performance.timing.navigationStart over performance.timeOrigin because timeOrigin can be much farther in the past than the actual navigation start (Firefox 71, https://bugzilla.mozilla.org/show_bug.cgi?id=1429926) and is not supported in Safari <15. Falls back to performance.timeOrigin in environments without performance.timing (Web Workers, Service Workers, Node.js). performance.timeOrigin is fractional, so it is floored to whole milliseconds, like navigationStart: the origin is never later than the actual one.

      Returns TimeStamp

      The time origin as a TimeStamp, in whole milliseconds.