Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PerformanceTimer

Hierarchy

  • PerformanceTimer

Index

Methods

Methods

Static now

  • now(): number
  • Returns timestamp in milliseconds since page load.

    If the [[DOMHighResTimeStamp]] is supported, the resolution is up to 5 microseconds, otherwise it is in milliseconds. Timespans are computed by taking the difference between two samples.

    Example:

    const now = PerformanceTimer.now();
    // call some expensive function for which you want to check the duration.
    const end = PerformanceTimer.now();
    const elapsedTime = end - now;

    Returns number

Generated using TypeDoc