- toString
Convert Duration to string format. The string format will contains 3, 6, or 9
fractional digits depe
- parse
Parse from a string to produce a duration.
- toMillis
Convert a Duration to the number of milliseconds. The result will be rounded
towards 0 to the neares
- fromMillis
Create a Duration from the number of milliseconds.
- fromMicros
Create a Duration from the number of microseconds.
- fromNanos
Create a Duration from the number of nanoseconds.
- toMicros
Convert a Duration to the number of microseconds. The result will be rounded
towards 0 to the neares
- toNanos
Convert a Duration to the number of nanoseconds.
- add
Add two durations.
- checkValid
Throws an IllegalArgumentException if the given Duration is not valid.
- fromSeconds
Create a Duration from the number of seconds.
- isValid
Returns true if the given Duration is valid. The seconds value must be in the
range [-315,576,000,00