NativeClock class

Monotonic clock based on CLOCK_BOOTTIME that is not influenced by system time changes and includes time spent in sleep.

This clock is only available on Android!

This is the recommend clock to use on android

Inheritance
Mixed-in types

Constructors

NativeClock.new()
Default constructor
NativeClock.create(NativeClockBindings nativeClock)
Custom constructor mostly used for testing

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
startTime DateTime
Wall clock start time
getter/setter pairinherited

Methods

duration() Duration
The current Duration since the timer was started
inherited
durationMicros() int
The current number of microseconds since the timer was started
inherited
durationMillis() int
The current number of milliseconds since the timer was started
inherited
durationNanos() int
The current number of nanoseconds since the timer was started
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
now() DateTime
The current DateTime
inherited
nowMicros() int
The current number of microseconds since the "Unix epoch" 1970-01-01T00:00:00Z (UTC).
inherited
nowMillis() int
The current number of milliseconds since the "Unix epoch" 1970-01-01T00:00:00Z (UTC).
inherited
nowNanos() int
The current number of nanoseconds since the "Unix epoch" 1970-01-01T00:00:00Z (UTC).
inherited
start() → void
Start the clock calling any now before the clock is started will throw an exception!
override
toString() String
A string representation of this object.
inherited

Operators

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