DurationUnit enum
The list of possible time measurement units, in which a duration can be expressed.
The smallest time unit is NANOSECONDS and the largest is DAYS, which corresponds to exactly 24 HOURS.
- Inheritance
- Available extensions
Values
- DAYS → const DurationUnit
-
Time unit representing one day, which is always equal to 24 hours.
- HOURS → const DurationUnit
-
Time unit representing one hour.
- MINUTES → const DurationUnit
-
Time unit representing one minute.
- SECONDS → const DurationUnit
-
Time unit representing one second.
- MILLISECONDS → const DurationUnit
-
Time unit representing one millisecond, which is 1/1000 of a second.
- MICROSECONDS → const DurationUnit
-
Time unit representing one microsecond, which is 1/1000 of a millisecond.
- NANOSECONDS → const DurationUnit
-
Time unit representing one nanosecond, which is 1/1000 of a microsecond.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDurationUnit(
) → DurationUnit -
Available on DurationUnit, provided by the DurationUnitExtension extension
Converts thisjava.util.concurrent.TimeUnitenum value to the correspondingkotlin.time.DurationUnitvalue. -
toString(
) → String -
A string representation of this object.
inherited
-
toTimeUnit(
) → TimeUnit -
Available on DurationUnit, provided by the DurationUnitExtension extension
Converts thiskotlin.time.DurationUnitenum value to the correspondingjava.util.concurrent.TimeUnitvalue.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
DurationUnit> - A constant List of the values in this enum, in order of their declaration.