Timestamp class

Utility class for working with OpenTelemetry timestamps.

Annotations
  • @immutable

Constructors

Timestamp.new()

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

dateTimeToString(DateTime value) String
Converts a DateTime value to a string in the format: "yyyy-MM-ddTHH:mm:ss.SSSZ"
fromDateTime(DateTime dateTime) int
Converts a DateTime to nanoseconds since epoch.
now() int
Returns the current timestamp in nanoseconds since epoch.
toDateTime(int nanos) DateTime
Converts nanoseconds since epoch to a DateTime.