Creates an instance of {@code Duration} from a number of seconds.

@param seconds  the number of seconds, up to scale 9, positive or negative
@return a {@code Duration}, not null
@throws ArithmeticException if numeric overflow occurs
767229
private static Duration create(BigDecimal seconds) {
        BigInteger nanos = seconds.movePointRight(9).toBigIntegerExact();
        BigInteger[] divRem = nanos.divideAndRemainder(BI_NANOS_PER_SECOND);
        if (divRem[0].bitLength() > 63) {
            throw new ArithmeticException("Exceeds capacity of Duration: " + nanos);
        }
        return ofSeconds(divRem[0].longValue(), divRem[1].intValue());
    }
456196
public TimeDuration minus(TimeDuration duration) {
        return createWithCarry(sec - duration.getSec(), nanoSec - duration.getNanoSec());
    }
424549
public LongPressOptions withDuration(Duration duration) {
        checkNotNull(duration);
        checkArgument(duration.toMillis() >= 0,
                "Duration value should be greater or equal to zero");
        this.duration = duration;
        return this;
    }
510528
public boolean isExpired(int seconds) {
        long diff = localIssuedAt.getTime() - issuedAt.getTime();
        long localExpiresAtTime = expiresAt.getTime() + diff;
        return (new Date().getTime() - seconds * 1000) >= localExpiresAtTime;
    }
160369
def split_seconds(seconds):
    
    ms = seconds * 1000
    divisors = (1, 24, 60, 60, 1000)
    quotient, result = ms, []
    for divisor in divisors[::-1]:
        quotient, remainder = divmod(quotient, divisor)
        result.append(quotient) if divisor == 1 else result.append(remainder)
    return result[::-1]
1356699
public static MachineTime<SI> ofSISeconds(BigDecimal seconds) {

        BigDecimal secs = seconds.setScale(0, RoundingMode.FLOOR);
        int fraction =
            seconds.subtract(secs)
            .multiply(BigDecimal.valueOf(MRD))
            .setScale(0, RoundingMode.DOWN)
            .intValueExact();
        return ofSIUnits(secs.longValueExact(), fraction);

    }
1074276
private Duration getDuration(Double duration)
   {
      Duration result = null;

      if (duration != null)
      {
         result = Duration.getInstance(NumberHelper.getDouble(duration), TimeUnit.HOURS);
      }

      return result;
   }
361083
public Long expire(Object key, int seconds) {
		Jedis jedis = getJedis();
		try {
			return jedis.expire(keyToBytes(key), seconds);
		}
		finally {close(jedis);}
	}
278962
public Duration add( long duration,
                         TimeUnit unit ) {
        long durationInNanos = TimeUnit.NANOSECONDS.convert(duration, unit);
        return new Duration(this.durationInNanos + durationInNanos);
    }
1257461
@Pure
	@Inline(value = "(long) (($1).doubleValue() * $2.MILLIS_IN_SECOND)", imported = {TimeExtensions.class})
	public static long seconds(Number secs) {
		return (long) (secs.doubleValue() * MILLIS_IN_SECOND);
	}
1050831
public static final Duration parseDurationInThousanthsOfMinutes(ProjectProperties properties, Number value, TimeUnit targetTimeUnit)
   {
      return parseDurationInFractionsOfMinutes(properties, value, targetTimeUnit, 1000);
   }
437899
public long add(long instant, long duration, int scalar) {
        if (duration == 0 || scalar == 0) {
            return instant;
        }
        long add = FieldUtils.safeMultiply(duration, scalar);
        return FieldUtils.safeAdd(instant, add);
    }
881690
public static String secondToTime(int seconds) {
		if (seconds < 0) {
			throw new IllegalArgumentException("Seconds must be a positive number!");
		}

		int hour = seconds / 3600;
		int other = seconds % 3600;
		int minute = other / 60;
		int second = other % 60;
		final StringBuilder sb = new StringBuilder();
		if (hour < 10) {
			sb.append("0");
		}
		sb.append(hour);
		sb.append(":");
		if (minute < 10) {
			sb.append("0");
		}
		sb.append(minute);
		sb.append(":");
		if (second < 10) {
			sb.append("0");
		}
		sb.append(second);
		return sb.toString();
	}
1258075
@BackendProperty
    public void setQueryTimeout(Integer seconds) {
        if (seconds != null && seconds.intValue() < 0) {
            throw new IllegalArgumentException("invalid seconds: " + seconds);
        }
        this.queryTimeout = seconds;
    }
33389
public static double durationMinutes(LocalDateTime start, LocalDateTime end)
   {
	   
      return Duration.between(start, end).toMinutes();
   }
306834
public static MachineTime<SI> ofSIUnits(
        long seconds,
        int fraction
    ) {

        if ((seconds == 0) && (fraction == 0)) {
            return UTC_ZERO;
        }

        return new MachineTime<>(seconds, fraction, UTC);

    }
852052
public static Duration getDurationByTimeValues(final long hours, final long minutes, final long seconds) {
        return Duration.ofHours(hours).plusMinutes(minutes).plusSeconds(seconds);
    }