Type Hierarchy:
Satisfied Interfaces: ReadableDuration, Scalable<Integer,Duration>

Duration specifies a discreet amount of milliseconds between two instances of time.

Initializer
Duration(Integer milliseconds)
Parameters:
  • milliseconds

    Number of milliseconds of this duration.

Attributes
millisecondsSource Code
shared actual Integer milliseconds

Number of milliseconds of this duration.

Refined declaration: milliseconds
periodSource Code
shared Period period

Returns this duration as a period of milliseconds.

stringSource Code
shared actual String string

Returns the string representation of this duration.

Refined declaration: string
Inherited Attributes
Attributes inherited from: Object
hash
Attributes inherited from: ReadableDuration
Methods
equalsSource Code
shared actual Boolean equals(Object other)

Duration is considered equal when type and milliseconds are the same.

Refined declaration: equals
scaleSource Code
shared actual Duration scale(Integer scale)

Returns a new Duration with it´s milliseconds scaled.

Refined declaration: scale
Inherited Methods
Methods inherited from: Scalable<Scale,Value>
scale