pub struct PressTiming {
pub sent_ms: u64,
pub received_ms: u64,
pub latest_down_offset_ms: u64,
pub earliest_up_offset_ms: u64,
pub handler_wall_ms: u64,
}Expand description
What the runner reported about when a press was actually held, paired with what the host observed about the round trip.
Offsets are measured by the runner from the moment its handler was entered, not from any shared clock. Nothing here assumes the simulator and the host agree on the time of day.
Fields§
§sent_ms: u64Host clock when the request went out.
received_ms: u64Host clock when the response came back.
latest_down_offset_ms: u64Runner clock, handler entry → the latest instant the touch could have gone down.
The runner cannot see inside press(forDuration:), so it reports
bounds rather than instants: the call spanned [A, B] and held
for d, so the touch went down no later than B - d and lifted
no earlier than A + d. Composing these as if they were the
instants themselves would widen the window rather than narrow it,
which is why they are named for the bound they are.
earliest_up_offset_ms: u64Runner clock, handler entry → the earliest instant the touch could have lifted.
handler_wall_ms: u64Runner clock, handler entry → handler return.
Implementations§
Source§impl PressTiming
impl PressTiming
Sourcepub fn unplaceable() -> Self
pub fn unplaceable() -> Self
A press whose bounds the runner did not report.
Every offset is zero, so no interval is certainly held and every
frame comes back Uncertain. That is the honest answer for a
platform that cannot time its own press.
Trait Implementations§
Source§impl Clone for PressTiming
impl Clone for PressTiming
Source§fn clone(&self) -> PressTiming
fn clone(&self) -> PressTiming
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more