SlowOperationTimer class

A disposable timer for measuring slow operations. Use with try/finally to ensure proper cleanup.

Constructors

SlowOperationTimer({required String description, int thresholdMs = defaultSlowOperationThresholdMs, void onSlow(SlowOperation)?})

Properties

description String
final
hashCode int
The hash code for this object.
no setterinherited
onSlow → void Function(SlowOperation)?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
thresholdMs int
final

Methods

dispose() → void
Stop the timer and check if the operation was slow.
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