Skip to main content

update_timers

Function update_timers 

Source
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 PinVerified event refreshes the session timer (the user is active).
  • A successful SignComplete also refreshes the session timer.
  • Leaving Authenticated (or its children: WaitingForTouch, Signing) for Idle or Error clears the session timer.
  • Entering Error arms the error display timer.
  • Leaving Error clears the error display timer.