JS Built-ins
performanceintermediate

performance β€” timeOrigin is less than Date.now() + 1

πŸ“– Usage Example
performance.timeOrigin + performance.now()
// β†’ approx Date.now()

Adding timeOrigin and now() approximates the current Unix timestamp in milliseconds.

performance.timeOrigin β€” before now

performance.timeOrigin represents the past (the moment the page/process started), so it must be less than the current time.

Challenge: Verify that performance.timeOrigin < Date.now() + 1.

πŸ’‘ Hints (1)
  • β€’ We add 1ms to account for the tiny time elapsed between evaluating timeOrigin and Date.now()