/** * Returns whether the deadline has expired. * * @return whether the deadline has expired. */ public boolean isExpired() { setLastCheck(); return value < this.lastCheck; }
/** * Constructs a new instance with the given UNIX time in milliseconds. * * @param deadlineMillis UNIX time in milliseconds. */ private Deadline(final long deadlineMillis) { super(); this.value = deadlineMillis; setLastCheck(); }
/** * Returns the difference in milliseconds between the deadline and now. * * @return the different in milliseconds between the deadline and now. */ public long remaining() { setLastCheck(); return value - lastCheck; }
/** * Returns whether this deadline has not expired. * * @return whether this deadline has not expired. */ public boolean isNotExpired() { setLastCheck(); return value >= this.lastCheck; }
/** * Returns whether this deadline has not expired. * * @return whether this deadline has not expired. */ public boolean isNotExpired() { setLastCheck(); return value >= this.lastCheck; }
/** * Returns whether the deadline has expired. * * @return whether the deadline has expired. */ public boolean isExpired() { setLastCheck(); return value < this.lastCheck; }
/** * Constructs a new instance with the given UNIX time in milliseconds. * * @param deadlineMillis UNIX time in milliseconds. */ private Deadline(final long deadlineMillis) { super(); this.value = deadlineMillis; setLastCheck(); }
/** * Returns the difference in milliseconds between the deadline and now. * * @return the different in milliseconds between the deadline and now. */ public long remaining() { setLastCheck(); return value - lastCheck; }