Adds timer with dimensions to the registry
160968
def timer(self, key, **dims):
        """"""
        return super(RegexRegistry, self).timer(self._get_key(key), **dims)
347489
function(dimensions, usedDimensions, usedValues) {
        var activeDimensions = new Array(dimensions.length);
        var valueCounter = 1;
        for(var i=0; i<dimensions.length; i++) {
            var dimensionName;
            for(dimensionName in dimensions[i]){break}
            if(usedDimensions[dimensionName] === undefined) {
                activeDimensions[i] = 0;
                continue;
            }
            activeDimensions[i] = 1;
            this.dimensionsList.push(dimensionName);
            var labelCollector = {};
            valueCounter = this._dimensionWalk(dimensions[i][dimensionName], usedValues[dimensionName],
                valueCounter, [0], this.precedenceMap, labelCollector, this.numberToValue);
            this.valueToNumber[dimensionName] = labelCollector;
        }
        return activeDimensions;
    }
1291748
def register(coordinator):
    """"""
    timer_queue = Queue.Queue()
    coordinator.register(TimerItem, timer_queue)
    coordinator.worker_threads.append(
        TimerThread(timer_queue, coordinator.input_queue))
40269
def width(self, add_quiet_zone=False):
        
        quiet_zone = self.quiet_zone if add_quiet_zone else 0
        return len(self.modules) + 2 * quiet_zone
918414
def get_user_timer(self, index):
        """"""

        err, tick = self.clock_manager.get_tick(index)
        return [err, tick]
522822
def size_changed(self, settings, key, user_data):
        
        RectCalculator.set_final_window_rect(self.settings, self.guake.window)
301257
function addResizeEvent(func, dur) {
		    var oldResize = window.onresize,
				resizeTimer,
				dur = typeof dur === "undefined" ? 100 : parseInt(dur, 10);

			window.onresize = function () {
				clearTimeout(resizeTimer);

		        if (typeof oldResize === 'function') {
		            oldResize();
		        }

				resizeTimer = setTimeout(function() {
					func();
				}, dur);
			}
		}
813151
function Timer(name, millis, descending) {
  this.name = name;
  this.initialMillis = millis;
  this.millis = millis;
  this.descending = descending;
  this.running = false;
}
1078472
def add_time(self, extra_time):
        """"""
        window_start = self.parent.value('window_start') + extra_time
        self.parent.overview.update_position(window_start)
712826
public static Timer timer(Metrics metrics, String component, String methodName) {
    if (metrics != null) {
      return metrics.getTimer(component, methodName);
    } else {
      return null;
    }
  }
1035956
public <T> void addMetric(String name, MetricTimeslice<T> timeslice)
    {
        metrics.put(name, timeslice);
    }
919662
def install_timers(config, context):
    """"""
    timers = []
    if config.get('capture_timeout_warnings'):
        timeout_threshold = config.get('timeout_warning_threshold')
        # Schedule the warning at the user specified threshold given in percent.
        # ie: 0.50 of 30000 ms = 15000ms
        # Schedule the error a few milliseconds before the actual timeout happens.
        time_remaining = context.get_remaining_time_in_millis() / 1000
        timers.append(Timer(time_remaining * timeout_threshold, timeout_warning, (config, context)))
        timers.append(Timer(max(time_remaining - .5, 0), timeout_error, [config]))

    if config.get('capture_memory_warnings'):
        # Schedule the memory watch dog interval. Warning will re-schedule itself if necessary.
        timers.append(Timer(.5, memory_warning, (config, context)))

    for t in timers:
        t.start()

    return timers
748182
Timer timer(Meter.Id id, DistributionStatisticConfig distributionStatisticConfig, PauseDetector pauseDetectorOverride) {
        return registerMeterIfNecessary(Timer.class, id, distributionStatisticConfig, (id2, filteredConfig) -> {
            Meter.Id withUnit = id2.withBaseUnit(getBaseTimeUnitStr());
            return newTimer(withUnit, filteredConfig.merge(defaultHistogramConfig()), pauseDetectorOverride);
        }, NoopTimer::new);
    }
95890
function (dimensions, hash) {
    this.actionQueue.push(this.webdriverClient.setWindowSize.bind(this.webdriverClient, dimensions.width, dimensions.height));
    this.actionQueue.push(this._resizeCb.bind(this, dimensions, hash));
    return this;
  }
298679
@Override
    public Timer timer(String name) {
        return timer(new Metadata(name, MetricType.TIMER));
    }
354989
def dimensions(self, dims):
        """"""
        nx, ny, nz = dims[0], dims[1], dims[2]
        self.SetDimensions(nx, ny, nz)
        self.Modified()
365515
def timer(diff, processed):
    """"""
    # Changes seconds into minutes and seconds
    minutes, seconds = divmod(diff, 60)
    try:
        # Finds average time taken by requests
        time_per_request = diff / float(len(processed))
    except ZeroDivisionError:
        time_per_request = 0
    return minutes, seconds, time_per_request