TimeUtils class

Provides some functionality dart lacks internally.

WARNING: A potential race condition can be met by using the nano time here.

Long run times may eventually reach a maximum possible value. To prevent this, code should make use of the resetNanoTime function.

Constructors

TimeUtils.new()
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
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
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

getNanoTime() int
Returns the current simulated nanotime.
getUnixTimestamp() int
Returns a unix timestamp
initTimeTracker() → void
Starts the time tracker.
parseTimestamp(int unixTimestamp) DateTime
Converts a unix timestamp back into DateTime format.
resetNanoTime() → void
Resets the currently tracked nanoTime.
stopTimeTracker() → void
Stops the time tracker