Function elapsedTime

  • Return the number of milliseconds that have elapsed since the provided startTime the startTime MUST be obtained from perfNow to ensure the correct elapsed value is returned.

    Parameters

    • startTime: number

      The startTime obtained from perfNow

    Returns number

    The number of milliseconds that have elapsed since the startTime.

    Since

    0.4.4

    Example

    let start = perfNow();
    // Do some work
    let totalTime = elapsedTime(start);