Return a deadline advanced (i.
Return a deadline advanced (i.e. moved into the future) by the given duration.
Calculate time difference between this and the other deadline, where the result is directed (i.
Calculate time difference between this and the other deadline, where the result is directed (i.e. may be negative).
Return a deadline moved backwards (i.
Return a deadline moved backwards (i.e. towards the past) by the given duration.
Returns true if this
is less than that
Returns true if this
is less than that
Returns true if this
is less than or equal to that
.
Returns true if this
is less than or equal to that
.
Returns true if this
is greater than that
.
Returns true if this
is greater than that
.
Returns true if this
is greater than or equal to that
.
Returns true if this
is greater than or equal to that
.
The natural ordering for deadline is determined by the natural order of the underlying (finite) duration.
Result of comparing this
with operand that
.
Result of comparing this
with operand that
.
Returns string formatted according to given format
string.
Returns string formatted according to given format
string.
Format strings are as for String.format
(@see java.lang.String.format).
Determine whether the deadline still lies in the future at the point where this method is called.
Determine whether the deadline still lies in the future at the point where this method is called.
Note that on some systems this operation is costly because it entails a system call.
Check System.nanoTime
for your platform.
Determine whether the deadline lies in the past at the point where this method is called.
Determine whether the deadline lies in the past at the point where this method is called.
Note that on some systems this operation is costly because it entails a system call.
Check System.nanoTime
for your platform.
Calculate time difference between this duration and now; the result is negative if the deadline has passed.
Calculate time difference between this duration and now; the result is negative if the deadline has passed.
Note that on some systems this operation is costly because it entails a system call.
Check System.nanoTime
for your platform.
(deadline: StringAdd[Deadline]).+(other)
Returns true if this
is less than that
Returns true if this
is less than that
(deadline: math.Ordered[Deadline]).<(that)
Returns true if this
is less than or equal to that
.
Returns true if this
is less than or equal to that
.
(deadline: math.Ordered[Deadline]).<=(that)
Returns true if this
is greater than that
.
Returns true if this
is greater than that
.
(deadline: math.Ordered[Deadline]).>(that)
Returns true if this
is greater than or equal to that
.
Returns true if this
is greater than or equal to that
.
(deadline: math.Ordered[Deadline]).>=(that)
Result of comparing this
with operand that
.
Result of comparing this
with operand that
.
Implement this method to determine how instances of A will be sorted.
Returns x
where:
x < 0
when this < that
x == 0
when this == that
x > 0
when this > that
(deadline: math.Ordered[Deadline]).compare(that)
Result of comparing this
with operand that
.
Result of comparing this
with operand that
.
(deadline: math.Ordered[Deadline]).compareTo(that)
This class stores a deadline, as obtained via
Deadline.now
or the duration DSL:Its main purpose is to manage repeated attempts to achieve something (like awaiting a condition) by offering the methods
hasTimeLeft
andtimeLeft
. All durations are measured according toSystem.nanoTime
aka wall-time; this does not take into account changes to the system clock (such as leap seconds).