@pengzhanbo/utils - v3.7.3
    Preparing search index...

    Function timestamp

    • Get the current timestamp in milliseconds since the Unix epoch.

      获取自 Unix 纪元以来的当前时间戳(毫秒)。

      Returns number

      The current timestamp in milliseconds. 当前时间戳(毫秒)

      const ts = timestamp() // => 1700000000000 (example)
      

      Measuring elapsed time:

      const start = timestamp()
      // ... some operation
      const elapsed = timestamp() - start