Clock class abstract
The clock the transport's timing runs on: a monotonic instant for RTT samples, send times, ACK delay, pacing and the idle check, and the timers the PTO, the loss timer, the ACK timer and the watchdog are armed on.
DateTime.now() is the wall clock, which a phone steps on carrier time
sync, when it leaves doze, and across time zones for some vendors. Used for
timing, as it was, a forward step of more than the idle timeout closed
every connection on the next watchdog tick, a step of a few seconds
inflated one RTT sample into a five-second PTO, and a backward step gave
negative samples. A Stopwatch never steps. go-udx reads a monotonic
clock the same way (its Clock in clock.go).
Instants are Durations since the clock's origin; only differences between them mean anything. FakeClock lets a test drive time by hand.
- Implementers
Constructors
- Clock()
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
-
now(
) → Duration - The current instant.
-
timer(
Duration duration, void callback()) → Timer -
A timer that fires
callbackoncedurationhas passed on this clock. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited