duration specifies call duration to test against.
@param duration
greaterthan set to true finds call durations greater than or equal to specified. false
finds those less than.
@param greaterthan
@return
495620
public static List<CallLogEntry> getAllLogsOfDuration(List<CallLogEntry> logs, int duration, boolean greaterthan) {
		List<CallLogEntry> list = new ArrayList<CallLogEntry>();
		for(CallLogEntry log : logs) {
			if(log.duration<duration ^ greaterthan) {
			    list.add(log);
			}
		}
		return list;
	}
566070
@JsonProperty("duration")
    public Long getDuration() {
        if (start != null && end != null) {
            return start.until(end, ChronoUnit.MILLIS);
        } else {
            return null;
        }
    }
749361
public static <T extends Comparable<? super T>> boolean greaterThan(final T object,
            final T other) {

        return JudgeUtils.greaterThan(object, other);
    }
1092075
public static DayDuration valueOf(String duration) {
		int spacePos = duration.indexOf(' ');
		if(spacePos == -1) throw new IllegalArgumentException("Space not found in duration: " + duration);
		return getInstance(
			Integer.parseInt(duration.substring(0, spacePos)),
			Unit.valueOfUnit(duration.substring(spacePos + 1))
		);
	}
54469
public final void setMinimumDuration(Duration duration) {
        Objects.requireNonNull(duration);
        if (minimumDuration != null) {
            minimumDuration.set(duration);
        } else {
            _minimumDuration = duration;
        }
    }
907594
public static Delay constant(Duration delay) {

        LettuceAssert.notNull(delay, "Delay must not be null");
        LettuceAssert.isTrue(delay.toNanos() >= 0, "Delay must be greater or equal to 0");

        return new ConstantDelay(delay);
    }
113529
public void setTimeout(Duration timeout) {

        LettuceAssert.notNull(timeout, "Timeout must not be null");
        LettuceAssert.isTrue(!timeout.isNegative(), "Timeout must be greater or equal 0");

        this.timeout = timeout;
    }
525335
def set_duration(self, duration):
        
        if duration == 0:
            self.widget.setDuration(-2) #: Infinite
        else:
            self.widget.setDuration(0)
917070
public static Deadline fromNow(Duration duration) {
		return new Deadline(Math.addExact(System.nanoTime(), duration.toNanos()));
	}
259350
static long durationInNanos(long duration, @Nullable TimeUnit unit) {
    return (unit == null) ? UNSET_INT : unit.toNanos(duration);
  }
804277
@Pure
	@Inline(value="($1 > $2)", constantExpression=true)
	public static boolean operator_greaterThan(long a, double b) {
		return a > b;
	}
914524
@Override
    public <Y extends Comparable<? super Y>> Predicate greaterThan(Expression<? extends Y> lhs,
            Expression<? extends Y> rhs)
    {

        return new ComparisonPredicate(lhs, rhs, ConditionalOperator.GT);
    }
216680
public TimeDuration durationBetween(Timestamp time) {
        long nanoSecDiff = time.nanoSec - nanoSec;
        nanoSecDiff += (time.unixSec - unixSec) * 1000000000;
        nanoSecDiff = Math.abs(nanoSecDiff);
        return TimeDuration.ofNanos(nanoSecDiff);
    }
446655
private static Duration parseDuration(String duration) throws ParseException {
        Matcher matcher = pattern.matcher(duration);

        long nanoseconds = 0L;

        if (matcher.find() && matcher.groupCount() == 4) {
            int days = Integer.parseInt(matcher.group(1));
            nanoseconds += TimeUnit.NANOSECONDS.convert(days, TimeUnit.DAYS);
            int hours = Integer.parseInt(matcher.group(2));
            nanoseconds += TimeUnit.NANOSECONDS.convert(hours, TimeUnit.HOURS);
            int minutes = Integer.parseInt(matcher.group(3));
            nanoseconds += TimeUnit.NANOSECONDS.convert(minutes, TimeUnit.MINUTES);
            int seconds = Integer.parseInt(matcher.group(4));
            nanoseconds += TimeUnit.NANOSECONDS.convert(seconds, TimeUnit.SECONDS);
            long nanos = Long.parseLong(matcher.group(5));
            nanoseconds += nanos;
        } else {
            throw new ParseException("Cannot parse duration " + duration, 0);
        }

        return Duration.ofNanos(nanoseconds);
    }
633844
public static StringBuilder durationConfigString(Duration duration) {
        Duration remainder = duration;

        long days = remainder.getStandardDays();
        remainder = remainder.minus(Duration.standardDays(days));

        long hours = remainder.getStandardHours();
        remainder = remainder.minus(Duration.standardHours(hours));

        long minutes = remainder.getStandardMinutes();
        remainder = remainder.minus(Duration.standardMinutes(minutes));

        long seconds = remainder.getStandardSeconds();
        remainder = remainder.minus(Duration.standardSeconds(seconds));

        if (!remainder.isEqual(Duration.ZERO))
            Logger.getLogger(ConfigSupport.class.getName()).log(Level.WARNING, "Duration is more precise than configuration will handle: {0}, dropping remainder: {1}", new Object[]{duration, remainder});

        StringBuilder result = new StringBuilder();
        if (days != 0) {
            if (result.length() != 0) result.append(' ');
            result.append(days).append('d');
        }
        if (hours != 0) {
            if (result.length() != 0) result.append(' ');
            result.append(hours).append('h');
        }
        if (minutes != 0) {
            if (result.length() != 0) result.append(' ');
            result.append(minutes).append('m');
        }
        if (result.length() == 0 || seconds != 0) {
            if (result.length() != 0) result.append(' ');
            result.append(seconds).append('s');
        }

        return result;
    }
1233052
private static final Duration parseDurationInFractionsOfMinutes(ProjectProperties properties, Number value, TimeUnit targetTimeUnit, int factor)
   {
      Duration result = null;

      if (value != null)
      {
         result = Duration.getInstance(value.intValue() / factor, TimeUnit.MINUTES);
         if (targetTimeUnit != result.getUnits())
         {
            result = result.convertUnits(targetTimeUnit, properties);
         }
      }

      return (result);
   }
289662
public final void setDuration(int duration) {
        if (isComplete()) {
            this.getLogger()
                    .warn(
                            "{} is already closed, the new duration of {} will be ignored on: {}",
                            this.getClass().getSimpleName(),
                            duration,
                            this);
            return;
        }
        this.duration = duration;
    }