Extends this subscription by the provided delta.

		:param delta: The timedelta by which to extend this subscription.
		:type delta: timedelta
488578
def extend(self, delta):
		

		if delta.total_seconds() < 0:
			raise ValueError("delta must be a positive timedelta.")

		if self.trial_end is not None and self.trial_end > timezone.now():
			period_end = self.trial_end
		else:
			period_end = self.current_period_end

		period_end += delta

		return self.update(prorate=False, trial_end=period_end)
1344657
def get_and_add(self, delta):
        '''
        
        '''
        with self._lock.exclusive:
            oldval = self._value
            self._value += delta
            return oldval
605902
private Delta<E> toDelta(difflib.Delta<E> delta) throws DiffException
    {
        Delta<E> newDelta;

        switch (delta.getType()) {
            case CHANGE:
                newDelta = new ChangeDelta<E>(delta.getOriginal(), delta.getRevised());
                break;
            case DELETE:
                newDelta = new DeleteDelta<E>(delta.getOriginal(), delta.getRevised());
                break;
            case INSERT:
                newDelta = new InsertDelta<E>(delta.getOriginal(), delta.getRevised());
                break;
            default:
                throw new DiffException(String.format("Failed to convert [%s] info [%s]. Unknown type [%s]", delta
                    .getClass().getName(), Delta.class.getName(), delta.getType().toString()));
        }

        return newDelta;
    }
497744
def tick_deltas
      unless @delta.empty?
        merge_to_db(@delta)
        @tick_delta.concat(@delta.values) if accumulate_tick_deltas
        @delta.clear
      end
      unless @new_delta.empty?
        # We allow @new_delta to contain duplicates but eliminate them here. We
        # can't just allow duplicate delta tuples because that might cause
        # spurious infinite delta processing loops.
        @new_delta.reject! {|key, val| self[key] == val}

        @delta = @new_delta
        @new_delta = {}
      end
      return !(@delta.empty?)
    end
848112
def extend(self, step):
        
        self.timesteps.extend(step.timesteps)
        self.masks.extend(step.masks)
        self.x.extend(step.x)
        self.y.extend(step.y)
        self.i.extend(step.i)
        self.j.extend(step.j)
        self.end_time = step.end_time
        self.times = np.arange(self.start_time, self.end_time + self.step, self.step)
        self.u = np.concatenate((self.u, step.u))
        self.v = np.concatenate((self.v, step.v))
        for attr in self.attributes.keys():
            if attr in step.attributes.keys():
                self.attributes[attr].extend(step.attributes[attr])
171552
def extend(self, expire=None):
        
        if expire is None:
            if self._expire is not None:
                expire = self._expire
            else:
                raise TypeError(
                    "To extend a lock 'expire' must be provided as an "
                    "argument to extend() method or at initialization time."
                )
        error = _eval_script(self._client, EXTEND, self._name, args=(expire, self._id))
        if error == 1:
            raise NotAcquired("Lock %s is not acquired or it already expired." % self._name)
        elif error == 2:
            raise NotExpirable("Lock %s has no assigned expiration time" %
                               self._name)
        elif error:
            raise RuntimeError("Unsupported error code %s from EXTEND script" % error)
363548
def updated_time_delta(self):
        
        local_timezone = tzlocal()
        update_at = datetime.datetime.strptime(self.updated_at, '%Y-%m-%dT%XZ')
        update_at_utc = pytz.utc.localize(update_at)
        update_at_local = update_at_utc.astimezone(local_timezone)
        delta = datetime.datetime.now(local_timezone) - update_at_local
        return int(delta.total_seconds())
330494
function Delta(modelID) {
  if (false === (this instanceof Delta)) throw new Error('new operator required');
  if (false === (modelID instanceof Attribute.ModelID)) throw new Error('Attribute.ModelID required in constructor');
  this.dateCreated = new Date();
  this.modelID = modelID;
  this.attributeValues = {};
}
349567
def delta(self):
        
        number      = self._numberSpinner.value()
        unit        = self._unitCombo.currentText()
        direction   = self._directionCombo.currentText()
        
        # use past tense
        if direction == 'ago':
            number = -number
        
        if unit == 'year(s)':
            return datetime.timedelta(number * 365)
        elif unit == 'month(s)':
            return datetime.timedelta(number * 30)
        elif unit == 'week(s)':
            return datetime.timedelta(number * 7)
        elif unit == 'day(s)':
            return datetime.timedelta(number)
        elif unit == 'hour(s)':
            return datetime.timedelta(0, number * 3600)
        elif unit == 'minute(s)':
            return datetime.timedelta(0, number * 60)
        else:
            return datetime.timedelta(0, number)
462221
public int addAndGetHi(int delta) {
        while (true) {
            long encoded = get();
            int hi = getHi(encoded) + delta;
            long update = encodeHi(encoded, hi);
            if (compareAndSet(encoded, update))
                return hi;
        }
    }
1151618
def _extend(self, newsub):
        '''
        
        '''
        current = self
        while hasattr(current, '_sub'):
            current = current._sub
        _set(current, '_sub', newsub)
        try:
            object.__delattr__(self, '_extra')
        except:
            pass
857835
public void updateMorphTime(float delta) {
		offset += delta;
		if (offset < 0) {
			int index = shapes.indexOf(current);
			if (index < 0) {
				index = shapes.size() - 1;
			}
			
			int nframe = rational(index+1);
			setFrame(index, nframe, offset);
			offset += 1;
		} else if (offset > 1) {
			int index = shapes.indexOf(next);
			if (index < 1) {
				index = 0;
			}
			
			int nframe = rational(index+1);
			setFrame(index, nframe, offset);
			offset -= 1;
		} else {
			pointsDirty = true;
		}
	}
1277327
def _add_delta_tdi(self, other):
        
        assert isinstance(self.freq, Tick)  # checked by calling function

        delta = self._check_timedeltalike_freq_compat(other)
        return self._addsub_int_array(delta, operator.add).asi8
18710
def get_delta(value):
    
    if isinstance(value, (int, float)):
        return timedelta(seconds=value)
    elif isinstance(value, timedelta):
        return value
    raise Exception('Invalid delta')
1355088
public void update(int delta) {
		emitter.updateParticle(this, delta);
		life -= delta;
		
		if (life > 0) {
			x += delta * velx;
			y += delta * vely;
		} else {
			engine.release(this);
		}
	}
460188
def _subtract_timedelta(self, delta):
        
        if isinstance(delta, pendulum.Duration):
            return self.subtract(
                years=delta.years,
                months=delta.months,
                weeks=delta.weeks,
                days=delta.remaining_days,
                hours=delta.hours,
                minutes=delta.minutes,
                seconds=delta.remaining_seconds,
                microseconds=delta.microseconds,
            )

        return self.subtract(
            days=delta.days, seconds=delta.seconds, microseconds=delta.microseconds
        )
5416
synchronized void increaseLength(long delta) {
        Preconditions.checkState(!this.sealed, "Cannot increase the length of a sealed SegmentChunk.");
        Preconditions.checkArgument(delta >= 0, "Cannot decrease the length of a SegmentChunk.");
        this.length += delta;
    }