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

    if (duration < mr.MediumTiming.THREE_MINUTES_) {
      duration = mr.MediumTiming.THREE_MINUTES_;
    }

    if (duration > mr.LongTiming.ONE_HOUR_) {
      duration = mr.LongTiming.ONE_HOUR_;
    }

    try {
      chrome.metricsPrivate.recordLongTime(name, duration);
    } catch (e) {
      mr.LongTiming.logger_.warning(
          'Failed to record time ' + duration + ' in ' + name);
    }
  }
/**
   * Sends a long duration value (up to 1 hour) for analytics collection.
   * @param {string} name
   * @param {number} duration Duration in milliseconds.
   */
Sends a long duration value (up to 1 hour) for analytics collection.
@param {string} name
@param {number} duration Duration in milliseconds.
Sends a long duration value ( up to 1 hour ) for analytics collection . @param { string } name @param { number } duration Duration in milliseconds .
static recordDuration(name, duration) {
    if (duration < 0) {
      mr.LongTiming.logger_.warning(
          'Timing analytics event with negative time');
      return;
    }
    if (duration < mr.MediumTiming.THREE_MINUTES_) {
      duration = mr.MediumTiming.THREE_MINUTES_;
    }
    if (duration > mr.LongTiming.ONE_HOUR_) {
      duration = mr.LongTiming.ONE_HOUR_;
    }
    try {
      chrome.metricsPrivate.recordLongTime(name, duration);
    } catch (e) {
      mr.LongTiming.logger_.warning(
          'Failed to record time ' + duration + ' in ' + name);
    }
  }
static recordDuration ( name , duration ) { if ( duration < 0 ) { mr . LongTiming . logger_ . warning ( 'Timing analytics event with negative time' ) ; return ; } if ( duration < mr . MediumTiming . THREE_MINUTES_ ) { duration = mr . MediumTiming . THREE_MINUTES_ ; } if ( duration > mr . LongTiming . ONE_HOUR_ ) { duration = mr . LongTiming . ONE_HOUR_ ; } try { chrome . metricsPrivate . recordLongTime ( name , duration ) ; } catch ( e ) { mr . LongTiming . logger_ . warning ( 'Failed to record time ' + duration + ' in ' + name ) ; } }
Sends a long duration value (up to 1 hour) for analytics collection.
Sends a long duration value ( up to 1 hour ) for analytics collection .