ChronoUnit enum

A unit of time, from nanoseconds to days: the unit in which a plain number is read as a duration.

An application meets it in @DurationUnit(ChronoUnit.seconds), which makes timeout=30 mean 30 seconds instead of 30 milliseconds, and in DurationStyle.parse. Only the units a Dart Duration can hold exist.

Spring (Java): java.time.temporal.ChronoUnit.

Inheritance
Available extensions

Values

nanos → const ChronoUnit

Nanoseconds (truncated to microseconds).

micros → const ChronoUnit

Microseconds.

millis → const ChronoUnit

Milliseconds.

seconds → const ChronoUnit

Seconds.

minutes → const ChronoUnit

Minutes.

hours → const ChronoUnit

Hours.

days → const ChronoUnit

Days (24 hours).

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
of(int amount) → Duration
A duration of amount of this unit.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

values → const List<ChronoUnit>
A constant List of the values in this enum, in order of their declaration.