static recordDuration(name, duration) {
    if (duration < 0) {
      mr.Timing.logger_.warning('Timing analytics event with negative time');
      duration = 0;
    }

    if (duration > mr.Timing.TEN_SECONDS_) {
      duration = mr.Timing.TEN_SECONDS_;
    }

    try {
      chrome.metricsPrivate.recordTime(name, duration);
    } catch (e) {
      mr.Timing.logger_.warning(
          'Failed to record time ' + duration + ' in ' + name);
    }
  }
/**
   * Sends a short duration value (up to 10 seconds) for analytics collection.
   * @param {string} name
   * @param {number} duration Duration in milliseconds.
   */
Sends a short duration value (up to 10 seconds) for analytics collection.
@param {string} name
@param {number} duration Duration in milliseconds.
Sends a short duration value ( up to 10 seconds ) for analytics collection . @param { string } name @param { number } duration Duration in milliseconds .
static recordDuration(name, duration) {
    if (duration < 0) {
      mr.Timing.logger_.warning('Timing analytics event with negative time');
      duration = 0;
    }
    if (duration > mr.Timing.TEN_SECONDS_) {
      duration = mr.Timing.TEN_SECONDS_;
    }
    try {
      chrome.metricsPrivate.recordTime(name, duration);
    } catch (e) {
      mr.Timing.logger_.warning(
          'Failed to record time ' + duration + ' in ' + name);
    }
  }
static recordDuration ( name , duration ) { if ( duration < 0 ) { mr . Timing . logger_ . warning ( 'Timing analytics event with negative time' ) ; duration = 0 ; } if ( duration > mr . Timing . TEN_SECONDS_ ) { duration = mr . Timing . TEN_SECONDS_ ; } try { chrome . metricsPrivate . recordTime ( name , duration ) ; } catch ( e ) { mr . Timing . logger_ . warning ( 'Failed to record time ' + duration + ' in ' + name ) ; } }
Sends a short duration value (up to 10 seconds) for analytics collection.
Sends a short duration value ( up to 10 seconds ) for analytics collection .