Record timing by name.

@param {string} name Name of the timing.
@param {?number} timing timing
553738
function recordTiming (name, timing) {
  recorder[name] = parseInt(timing, 10) || Date.now()
  performanceEvent.trigger('update', getTiming())
}
398089
@Override
    public Counter counter(String name) {
        return this.counter(new Metadata(name, MetricType.COUNTER));
    }
280823
function(name, absoluteTime) {
  this.name = name;
  this.startTime = now();
  this.absoluteTime = !!absoluteTime;
  this.adjust = 0;
  this.running = true;
}
1156016
public void setTime( String parameterName, Time value ) throws OdaException
	{
		// only applies to named input parameter
		parameters.put(parameterName, value);
	}
670384
public void setName(String name)
    {
        super.setName(name);
        m_tf.setName(name);
        if (m_button != null)
            m_button.setName(name);
        if (m_buttonTime != null)
            m_buttonTime.setName(name);
    }
788289
function(name) {
      if (debuggers[name]) {
        return debuggers[name];
      }
      var dbg = function(fmt) {
        // if this debugger is not enabled, do nothing.
        // Check it every time so we can enable or disable a debugger at runtime.
        // It won't be slow.
        if (!enableStatus[this._name]) {
          return;
        }

        fmt = coerce.apply(this, arguments);

        var curr = +new Date();  // IE8 don't have `Date.now()`
        var ms = curr - (this._timestamp || curr);
        this._timestamp = curr;

        if (isChrome) {
          fmt = '%c' + name + '%c ' + fmt + ' %c+' + humanize(ms);
          w.global.console.log(fmt, this._style, this._msgStyle, this._style);
        } else {
          fmt = name + ' ' + fmt + ' +' + humanize(ms);
          if (w.global.console && w.global.console.log) {
            w.global.console.log(fmt);
          }
          // Any one want to alert debug message? I think it's annoying.
        }
      };
      dbg._name = name;
      dbg._msgStyle = styles[0];
      dbg._style = style();
      enableStatus[name] = debug.enabled(name);
      debuggers[name] = dbg.bind(dbg);
      return debuggers[name];
    }
840869
def tst(name, &block)
      start = Time.now
      block.call
      status = SUCCEEDED
    rescue Failure => exception
      status = FAILED
    rescue StandardError => exception
      status = RAISED
    ensure
      elapsed = Time.now - start
      __record(name, status, elapsed, exception)
    end
947088
public static void checkDuration(final String duration, final String name) throws IllegalArgumentException {
    if (!duration.matches("(\\d+[wdmhs])+|inf")) {
      throw new IllegalArgumentException("Invalid InfluxDB duration: " + duration
         + " for " + name);
    }
  }
978384
public void startTimer(String name) {
        StopWatch sw = new StopWatch();
        sw.start();
        STOP_WATCHES.put(name, sw);
    }
256661
@SuppressWarnings("unchecked")
  public T delay(int milliseconds, String name, Function... funcs) {
    for (Element e : elements()) {
      queue(e, name, new DelayFunction(e, name, milliseconds, funcs));
    }
    return (T) this;
  }
361585
def end_timing(self, name, elapsed):
        
        counter = self.get(name, CounterType.Interval)
        self._calculate_stats(counter, elapsed)
        self._update()
997742
function getTimeIncreaseFromName(methodName) {
  const matchNumbers = String(methodName).match(/_increaseTimeBy(\d+)/);

  if (matchNumbers !== null
    && typeof matchNumbers[1] === 'string') {
    return parseInt(matchNumbers[1], 10);
  }

  return 0;
}
506035
function (name, step) {
            if (this._counters.hasOwnProperty(name)) {
                this._counters[name] += (step || 1);
            } else {
                this._counters[name] = (step || 1);
            }
        }
10683
function record(name, num, statistics, aggregations, timestamp, callback) {
        timestamp = timestamp || Date.now();
        function recordStats(key) {
            statistics && statistics.forEach(function(stat) {
                    if(stat == 'sum') {
                        multi.hincrby(key, 'sum', num)
                    } else if(scripts[stat]){
                        evalScript(multi, stat, [key, num],[],function(err, result) {
                                if(err) throw err;
                                if(result && result.indexOf('ERR') == 0) {
                                    // console.log(scripts[stat]);
                                    throw new Error(result);
                                }
                        })
                    }
            });
        }
        if(!statistics) statistics = ['sum'];
        if(num == undefined) num = 1;

        var multi = redis.multi();

        granularities.forEach(function(gran) {
                var key = getGranKey(name, gran, timestamp);
                recordStats(key);
                var unitPeriod = gran[0];
                multi.expire(key, points * unitPeriod / 1000);
        });

        if(aggregations) for(var i = 0; i < aggregations.length; i++) {
            var aggr = aggregations[i];
            var key = getAggrKey(name, aggr, timestamp);
            recordStats(key);
        }

        multi.exec(callback || log);
    }
202739
public void setOriginalAppenderName(String name) {
        this.originalAppenderName = name;
        this.initBatcher(this.originalAppenderName);
        this.putBufferTimeTracer = Monitors.newTimer("putBuffer",
                TimeUnit.NANOSECONDS);
        this.putDiscardMapTimeTracer = Monitors.newTimer("putDiscardMap",
                TimeUnit.NANOSECONDS);
        this.locationInfoTimer = Monitors.newTimer("locationInfo",
                TimeUnit.NANOSECONDS);
        this.saveThreadLocalTimer = Monitors.newTimer("saveThreadLocal",
                TimeUnit.NANOSECONDS);

        // We register these counters differently to the above timers, because need to keep the metric names as they were when we were
        // using DynamicCounter.increment() directly.
        this.summarizeEventCounter = initAndRegisterCounter(this.originalAppenderName + "_summarizeEvent");
        this.discardEventCounter = initAndRegisterCounter(this.originalAppenderName + "_discardEvent");
        this.putInBufferCounter = initAndRegisterCounter(this.originalAppenderName + "_putInBuffer");

        this.logSummaryMap = CacheBuilder
                .newBuilder()
                .initialCapacity(5000)
                .maximumSize(
                        CONFIGURATION.getLogSummarySize(originalAppenderName))
                .expireAfterWrite(
                        CONFIGURATION
                                .getLogSummaryExpiry(originalAppenderName),
                        TimeUnit.SECONDS).<String, LogSummary> build().asMap();
        try {
            Monitors.registerObject(this.originalAppenderName, this);
        } catch (Throwable e) {
            if (CONFIGURATION.shouldPrintLoggingErrors()) {
                System.err.println("Cannot register monitor for AsyncAppender "
                        + this.originalAppenderName);
                e.printStackTrace();
            }
        }
    }
621013
public function incrementTimer($name, $time) {
        if (!isset($this->timers[$name])) {
            $this->timers[$name] = 0;
        }
        $this->timers[$name] += $this->getTime() - $time;
    }
321663
public static final void serverShortName(String name)
    {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "serverShortName", name);

        _serverShortName = name;

        if (tc.isEntryEnabled())
            Tr.exit(tc, "serverShortName");
    }