fn update_timers(
state: TokenState,
last_event: Event,
session_deadline: &mut Option<Instant>,
error_deadline: &mut Option<Instant>,
)Expand description
Re-arm or clear the timers based on the SM state and the latest event.
- Entering [
TokenState::Authenticated] arms the session timer. - Each
PinVerifiedevent refreshes the session timer (the user is active). - A successful
SignCompletealso refreshes the session timer. - Leaving
Authenticated(or its children:WaitingForTouch,Signing) forIdleorErrorclears the session timer. - Entering
Errorarms the error display timer. - Leaving
Errorclears the error display timer.