Increments the put time accumulator.

@param duration the time taken in nanoseconds.
18748
public void addPutTimeNanos(long duration) {
        for (;;) {
            long nanos = putTimeTakenNanos;
            if (nanos <= Long.MAX_VALUE - duration) {
                if (PUT_TIME_TAKEN_NANOS.compareAndSet(this, nanos, nanos + duration)) {
                    return;
                }
            } else {
                //counter full. Just reset.
                if (PUT_TIME_TAKEN_NANOS.compareAndSet(this, nanos, duration)) {
                    clear();
                    return;
                }
            }
        }
    }
525335
def set_duration(self, duration):
        
        if duration == 0:
            self.widget.setDuration(-2) #: Infinite
        else:
            self.widget.setDuration(0)
245328
private void accept(final EvolutionDurations durations) {
		final double selection =
			toSeconds(durations.getOffspringSelectionDuration()) +
				toSeconds(durations.getSurvivorsSelectionDuration());
		final double alter =
			toSeconds(durations.getOffspringAlterDuration()) +
				toSeconds(durations.getOffspringFilterDuration());

		_selectionDuration.accept(selection);
		_alterDuration.accept(alter);
		_evaluationDuration
			.accept(toSeconds(durations.getEvaluationDuration()));
		_evolveDuration
			.accept(toSeconds(durations.getEvolveDuration()));
	}
36040
public Duration add( Duration duration ) {
        return new Duration(this.durationInNanos + (duration == null ? 0l : duration.longValue()));
    }
1028939
public void setValue(final Duration tenantDuration) {
        if (tenantDuration == null) {
            // no tenant specific configuration
            checkBox.setValue(false);
            durationField.setDuration(globalDuration);
            durationField.setEnabled(false);
            return;
        }

        checkBox.setValue(true);
        durationField.setDuration(tenantDuration);
        durationField.setEnabled(true);
    }
1180981
public void setDuration(Duration duration, Related related) {
		this.date = null;
		this.duration = duration;
		setRelated(related);
	}
79346
def update(self, duration):
        """"""
        if duration >= 0:
            self.histogram.update(duration)
            self.meter.mark()
654847
public Timestamp plus(TimeDuration duration) {
        return createWithCarry(unixSec + duration.getSec(), nanoSec + duration.getNanoSec());
    }
289275
def set_total_duration(self, duration):
        
        if duration < 1:
            raise ValueError(u'Duration must be postive')

        elif self.duration > duration:
            raise ValueError(u'{0} must be greater than current duration')

        self._total_duration = duration
1369389
protected synchronized void increment(long now) {
		pointer++;
		if (pointer >= timestamps.length) {
			pointer = 0;
		}
		timestamps[pointer] = now;
		max = now;

		int next = pointer + 1;
		if (next >= timestamps.length) {
			next = 0;
		}
		min = timestamps[next];
	}
219130
public void add(ReadableDuration duration) {
        if (duration != null) {
            add(new Period(duration.getMillis(), getPeriodType()));
        }
    }
689860
public static void setVisibleDuration(Duration duration) {
        BEHAVIOR.setVisibleDuration(duration == null ? Duration.millis(1500) : duration);
    }
54469
public final void setMinimumDuration(Duration duration) {
        Objects.requireNonNull(duration);
        if (minimumDuration != null) {
            minimumDuration.set(duration);
        } else {
            _minimumDuration = duration;
        }
    }
1319503
public void setAlterationTime(long newAlterationTime)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "setAlterationTime", new Long(newAlterationTime));

        this._alterationTime = newAlterationTime;

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "setAlterationTime");
    }
1358801
public function incrementEsiRateLimit(int $amount = 1)
    {

        if ($this->getRateLimitKeyTtl() > 3) {

            cache()->increment($this->ratelimit_key, $amount);

        } else {

            cache()->set($this->ratelimit_key, $amount, carbon('now')
                ->addMinutes($this->ratelimit_duration));
        }
    }
1029199
public T forTicks(int duration, int delay)
	{
		this.duration = Timer.tickToTime(duration);
		this.delay = Timer.tickToTime(delay);

		return self();
	}
1078774
@NonNull
    public IconicsAnimationProcessor duration(long duration, @NonNull TimeUnit timeUnit) {
        mDuration = timeUnit.toMillis(duration);
        return this;
    }