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.

    0.4.4

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