Adds delta nanoseconds. Delta can be negative. Month, year, day, hour,
minute, seconds and nanoSecond fields are affected.
@param delta
432717
public void plusNanoSeconds(long delta)
    {
        if (delta != 0)
        {
            long result = getNanoSecond() + delta;
            setNanoSecond((int) Math.floorMod(result, 1000000000));
            plusSeconds(Math.floorDiv(result, 1000000000));
        }
    }
273805
def time_delta(self, end_datetime=None):
        
        start_datetime = self._parse_start_datetime('now')
        end_datetime = self._parse_end_datetime(end_datetime)
        seconds = end_datetime - start_datetime

        ts = self.generator.random.randint(*sorted([0, seconds]))
        return timedelta(seconds=ts)
1215375
public void update(final float delta) {
        if (transitionInProgress) {
            currentValue += (targetValue - initialValue) * delta / transitionLength;
            if (isInitialGreater) {
                if (currentValue <= targetValue) {
                    finalizeTransition();
                }
            } else {
                if (currentValue >= targetValue) {
                    finalizeTransition();
                }
            }
        }
    }
83599
public function addMonths($delta)
    {
        $interval = new DateInterval('P'.abs($delta).'M');

        if ($delta > 0) {
            $this->add($interval);
        } elseif ($delta < 0) {
            $this->sub($interval);
        }

        return $this;
    }
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);
		}
	}
249894
public boolean isWithin(double delta)
    {
        readLock.lock();
        try
        {
            if (stats.count() >= stats.getInitialSize())
            {
                return (Navis.angleDiff(stats.getMin(), stats.getMax()) < delta);
            }
            else
            {
                return false;
            }
        }
        finally
        {
            readLock.unlock();
        }
    }
839873
public void grow(int delta) {
        if (delta == 0) {
            return;
        }
        int newLen = buffer.limit()+delta; 
        if (newLen <= buffer.capacity()) {
        	// there is more room in the underlying reserved buffer memory 
        	buffer.limit(newLen);
        	return;
        } else {
        	// create a new bigger buffer
            ByteBuffer newBuffer = buffer.isDirect() ? ByteBuffer.allocateDirect(newLen) : ByteBuffer.allocate(newLen);
            buffer.rewind();
            newBuffer.put(buffer);
            newBuffer.limit(newLen);
            // switch to new buffer
            buffer = newBuffer;
        }
    }
672963
public void updateMorphTime(float delta) {
		for (int i=0;i<figures.size();i++) {
			Figure figure = (Figure) figures.get(i);
			MorphShape shape = (MorphShape) figure.getShape();
			shape.updateMorphTime(delta);
		}
	}
1147812
@CanIgnoreReturnValue
  public final double getAndAdd(double delta) {
    while (true) {
      long current = value;
      double currentVal = longBitsToDouble(current);
      double nextVal = currentVal + delta;
      long next = doubleToRawLongBits(nextVal);
      if (updater.compareAndSet(this, current, next)) {
        return currentVal;
      }
    }
  }
986877
public void plusHours(long delta)
    {
        if (delta != 0)
        {
            long result = getHour() + delta;
            setHour((int) Math.floorMod(result, 24));
            plusDays(Math.floorDiv(result, 24));
        }
    }
18710
def get_delta(value):
    
    if isinstance(value, (int, float)):
        return timedelta(seconds=value)
    elif isinstance(value, timedelta):
        return value
    raise Exception('Invalid delta')
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;
		}
	}
1194007
def datetime_delta_to_ms(delta):
    
    delta_ms = delta.days * 24 * 60 * 60 * 1000
    delta_ms += delta.seconds * 1000
    delta_ms += delta.microseconds / 1000
    delta_ms = int(delta_ms)
    return delta_ms
1182218
def as_timedelta(cls, delta):
        """"""
        # Cannot monkey patch the __class__ and must pass through __new__ as the object is immutable.
        if isinstance(delta, cls): return delta
        return cls(delta.days, delta.seconds, delta.microseconds)
1098970
public void update(float deltaTime){
		if (updating) {
			throw new IllegalStateException("Cannot call update() on an Engine that is already updating.");
		}
		
		updating = true;
		ImmutableArray<EntitySystem> systems = systemManager.getSystems();
		try {
			for (int i = 0; i < systems.size(); ++i) {
				EntitySystem system = systems.get(i);
				
				if (system.checkProcessing()) {
					system.update(deltaTime);
				}
	
				while(componentOperationHandler.hasOperationsToProcess() || entityManager.hasPendingOperations()) {
					componentOperationHandler.processOperations();
					entityManager.processPendingOperations();
				}
			}
		}
		finally {
			updating = false;
		}	
	}
933271
def add_timedelta(self, delta):
        
        if delta.days:
            raise TypeError("Cannot add timedelta with days to Time.")

        return self.add(seconds=delta.seconds, microseconds=delta.microseconds)
264343
void addDelta(TableKelp db, int offset, int length)
  {
    if (_delta == null) {
      _delta = new int[2 * db.getDeltaMax()];
    }
    
    _delta[_deltaTail++] = offset;
    _delta[_deltaTail++] = length;
  }