Time this block.
961763
def timer(name, count):
    ''''''
    start = time.time()
    try:
        yield count
    finally:
        duration = time.time() - start
        print(name)
        print('=' * 10)
        print('Total: %s' % duration)
        print('  Avg: %s' % (duration / count))
        print(' Rate: %s' % (count / duration))
        print('')
1231632
private void rollBlocksScheduled(long now) {
    if ((now - lastBlocksScheduledRollTime) > 
        BLOCKS_SCHEDULED_ROLL_INTERVAL) {
      prevApproxBlocksScheduled = currApproxBlocksScheduled;
      currApproxBlocksScheduled = 0;
      lastBlocksScheduledRollTime = now;
    }
  }
817047
public void add(final ChronoStorageBlock block)
	{

		int revCount = block.getRevisionCounter();
		this.size += block.length();

		if (first == null) {
			first = block;
		}
		else {

			ChronoStorageBlock previous = null, current = first;
			do {
				if (revCount < current.getRevisionCounter()) {

					block.setCounterPrev(previous);
					block.setCounterNext(current);

					if (previous != null) {
						previous.setCounterNext(block);
					}

					current.setCounterPrev(block);

					if (current == this.first) {
						this.first = block;
					}

					return;
				}

				previous = current;
				current = current.getCounterNext();

			}
			while (current != null);

			// Add to end of list
			previous.setCounterNext(block);
			block.setCounterPrev(previous);
		}
	}
1202019
def timethis(func):
    """"""
    func_module, func_name = func.__module__, func.__name__

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        start = _time_perf_counter()
        r = func(*args, **kwargs)
        end = _time_perf_counter()
        print('timethis : <{}.{}> : {}'.format(func_module, func_name, end - start))
        return r
    return wrapper
210549
def sethello(self, time):
        
        _runshell([brctlexe, 'sethello', self.name, str(time)],
            "Could not set hello time in %s." % self.name)
1032210
def timing(module, name):
    
    start_time_s = time.time()
    try:
        yield
    finally:
        end_time_s = time.time()
        delta_s = end_time_s - start_time_s
        delta_ms = delta_s * 1000
        timer(module, name, delta_ms)
101518
def at(time)
            ms = Scheduler.parse_at(time) - @time_diff
            event = OneShot.new(self, ms)
            event.progress &Proc.new if block_given?
            schedule(event)
            event
        end
875107
def set(self, time):
        
        self._time = time
        self._pb.sec = int(self._time)
        self._pb.nsec = int((self._time - self._pb.sec) * 10 ** 9)
848052
def from(time, &block)
      time = time.to_time if time.is_a?(::Date)
      method, args = @method_chain.pop if block_given?
      if !method.nil?
        time.until(self).send(method, *args, &block)
      else
        time.until(self)
      end
    end
574174
def benchmark(times = 1, &block)
      elapsed = (1..times).collect do
        GC.start
        ::Benchmark.realtime(&block) * times
      end

      Result.new(elapsed)
    end
1148142
public void setMorphTime(float time) {
		int p = (int) time;
		int n = p + 1;
		float offset = time - p;
		
		p = rational(p);
		n = rational(n);
		
		setFrame(p, n, offset);
	}
564671
def timespan(start_time):
    """"""

    timespan = datetime.datetime.now() - start_time
    timespan_ms = timespan.total_seconds() * 1000
    return timespan_ms
227987
public void time(Runnable event) {
        long startTime = this.clock.getTick();
        try {
            event.run();
        } finally {
            update(this.clock.getTick() - startTime);
        }
    }
622731
function(time) {
			var t        = this;
			
			time = time ? time : (this.factory.time.time ? this.factory.time.time : this.factory.time.getTime());
			
			this.base(time);			
			this.meridiumText = this._isPM() ? 'PM' : 'AM';			
			this.meridium = $([
				'<ul class="flip-clock-meridium">',
					'<li>',
						'<a href="#">'+this.meridiumText+'</a>',
					'</li>',
				'</ul>'
			].join(''));
			
			this.meridium.insertAfter(this.factory.lists[this.factory.lists.length-1].$obj);
		}
739594
def request_time(self) -> float:
        """"""
        if self._finish_time is None:
            return time.time() - self._start_time
        else:
            return self._finish_time - self._start_time
17174
def perform_after(time, block=nil)
      task = Concurrent::ScheduledTask.new(time) do
        block = ->(){ yield } unless block
        self.async.perform_now block
      end
      task.execute
      task
    end
678992
def time( event )
      sync {stats[event].mark}
      yield
    ensure
      sync {stats[event].tick}
    end