src/service/performance-impl.js
/**
   * Tick fp time based on Chrome's legacy paint timing API when
   * appropriate.
   * `registerPaintTimingObserver_` calls the standards based API and this
   * method does nothing if it is available.
   */
Tick fp time based on Chrome's legacy paint timing API when
appropriate.
`registerPaintTimingObserver_` calls the standards based API and this
method does nothing if it is available.
Tick fp time based on Chrome ' s legacy paint timing API when appropriate . ` registerPaintTimingObserver_ ` calls the standards based API and this method does nothing if it is available .
tickLegacyFirstPaintTime_() {
    if (!this.win.PerformancePaintTiming
        && this.win.chrome
        && typeof this.win.chrome.loadTimes == 'function') {
      const fpTime = this.win.chrome.loadTimes().firstPaintTime
          * 1000 - this.win.performance.timing.navigationStart;
      if (fpTime <= 1) {
        return;
      }
      this.tickDelta('fp', fpTime);
    }
  }
tickLegacyFirstPaintTime_ ( ) { if ( ! this . win . PerformancePaintTiming && this . win . chrome && typeof this . win . chrome . loadTimes == 'function' ) { const fpTime = this . win . chrome . loadTimes ( ) . firstPaintTime * 1000 - this . win . performance . timing . navigationStart ; if ( fpTime <= 1 ) { return ; } this . tickDelta ( 'fp' , fpTime ) ; } }
Tick fp time based on Chrome's legacy paint timing API when
 appropriate.
Tick fp time based on Chrome ' s legacy paint timing API when appropriate .
// Detect deprecated first pain time API // https://bugs.chromium.org/p/chromium/issues/detail?id=621512 // We'll use this until something better is available. // Throw away bad data generated from an apparent Chrome bug // that is fixed in later Chrome versions.