subtract time value.
 @param [Time] other
 @return [Duration] duration
769707
def -(other)
      d = ::ROS::Duration.new
      d.secs = @secs - other.secs
      d.nsecs = @nsecs - other.nsecs
      d.canonicalize
    end
394703
@Override
  public ByteAmount minus(ResourceMeasure<Long> other) {
    checkArgument(Long.MIN_VALUE + other.value <= value,
        String.format("Subtracting %s from %s would overshoot Long.MIN_LONG", other, this));
    return ByteAmount.fromBytes(value - other.value);
  }
1133334
def duration(self, value):
        
        if value == self._defaults['duration'] and 'duration' in self._values:
            del self._values['duration']
        else:
            self._values['duration'] = value
216497
def elapsed_time_s(self):
        
        if self._start_time:
            return (datetime.datetime.now() - self._start_time).total_seconds()
        else:
            return 0
1235231
function icaltime_subtract_abs(aDate) {
      var unixTime = this.toUnixTime();
      var other = aDate.toUnixTime();
      return ICAL.Duration.fromSeconds(unixTime - other);
    }
1325756
def diff(self, dt=None, abs=True):
        
        if dt is None:
            dt = self.now(self.tz)

        return Period(self, dt, absolute=abs)
262909
def -(other)
      if other.instance_of?(TimeOfDay)
        TimeOfDay.from_second_of_day @second_of_day - other.second_of_day
      else
        TimeOfDay.from_second_of_day @second_of_day - other
      end
    end
380594
def difference(self, other):
        """"""
        return self.operation(other, lambda x, y: x - y)
1278250
def elapsed_time(start_time, finish_time)
      duration  = finish_time.to_i - start_time.to_i
      hours     = duration / 3600
      remainder = duration - (hours * 3600)
      minutes   = remainder / 60
      seconds   = remainder - (minutes * 60)
      sprintf "%02d:%02d:%02d", hours, minutes, seconds
    end
346338
def +(other)
      other = other.to_days if other.respond_to?(:to_days)
      ISO8601::Date.new((@date + other).iso8601)
    end
661477
@Override
    public final <T extends TimePoint<? super U, T>> T subtractFrom(T time) {

        return this.add(time, this, true);

    }
1147791
def get_duration(timestr1, timestr2, units='s'):
    
    valid_units = ['s', 'min', 'h']
    assert units in valid_units,\
      "Units must be one of {!s}".format(valid_units)

    duration = (
        gt.timestr_to_seconds(timestr2) - gt.timestr_to_seconds(timestr1)
    )

    if units == 's':
        return duration
    elif units == 'min':
        return duration/60
    else:
        return duration/3600
918417
def subtract_weeks(self, weeks: int) -> datetime:
        
        self.value = self.value - timedelta(weeks=weeks)
        return self.value
875372
def next_time(time, start_time, closing_time)
      @time = time
      unless @start_time
        @start_time = realign(time, start_time)
        @time = @start_time if @time < @start_time
      end

      return nil unless find_acceptable_time_before(closing_time)

      @uses += 1 if @time
      @time
    end
998316
def +(other)
      moment = @date_time.to_time.localtime(zone) + other.to_f.round(1)

      self.class.new(moment.strftime('%Y-%m-%dT%H:%M:%S.%N%:z'))
    end
417550
def subtract(self, **kwargs):
        """"""
        return self.from_datetime(
            pendulum.instance(self.datetime()).subtract(**kwargs)
        )
133185
def union(self, other):
        
        if self._slideDuration != other._slideDuration:
            raise ValueError("the two DStream should have same slide duration")
        return self.transformWith(lambda a, b: a.union(b), other, True)