TimeProvider class abstract
A clock for span start, end, and event timestamps.
The default SystemTimeProvider uses DateTime.now, which is microsecond-
precision on Dart-VM native and millisecond-precision on Dart-on-JS web
(Date.now() is the JS source — microsecondsSinceEpoch returns
millisecondsSinceEpoch * 1000, so the lower three digits are always
zero). For sub-millisecond spans on web, see WebTimeProvider in
lib/src/util/web_time_provider.dart, which routes through
window.performance.now() (~5µs nominal, browser-coarsened to ~100µs
for Spectre mitigation).
The provider is held on APITracerProvider; tracers and spans created
from a provider inherit its clock so that all timestamps in a trace are
consistent. SDK consumers configure it via OTel.initialize(timeProvider: ...); API-only consumers can pass it to the API tracer-provider factory.
- Implementers
Constructors
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
-
nowDateTime(
) → DateTime - Returns the current wall-clock time as a DateTime.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited