Class std.time.TimeInterval
Synopsis
public final class TimeInterval
Represents an interval in time, with nanosecond precision.
Fields
Constructors
Construct the time interval with the specified seconds and nanoseconds.
Construct the time interval in seconds.
Methods
Get the number of nanoseconds represented by this object. Note that this might overflow, because
internally, two long
s are used to represent the seconds+nanoseconds value, instead of just a single
long
.
Get the number of seconds represented by this object (rounded down to the nearest integer).
Get the number of minutes represented by this object.
Get the number of hours represented by this object.
Get the number of days represented by this object.
Get the number of weeks represented by this object.
Find the sum of two intervals.
Find the difference between two intervals.
Compare two TimeInterval
objects. Returns -1 if the second object is larger, 0 if equal, 1 otherwise.
Returns true
if equal.
Return a TimeInterval
instance corresponding to the value of this one, plus the specified
number of seconds.
Return a TimeInterval
instance corresponding to the value of this one, plus the specified
number of minutes.
Return a TimeInterval
instance corresponding to the value of this one, plus the specified
number of hours.
Return a TimeInterval
instance corresponding to the value of this one, plus the specified
number of days.