Skip to main content

Module use_inactivity_timer

Module use_inactivity_timer 

Source
Expand description

Inactivity timer hook for detecting when users need help.

This hook monitors user activity and triggers a callback when the user has been inactive for a specified duration. Used to trigger Socratic hints when students are struggling.

Structs§

InactivityState
State returned by the inactivity timer hook

Constants§

DEFAULT_INACTIVITY_THRESHOLD_MS
Default inactivity threshold (5 seconds)

Functions§

use_activity_resetter
use_inactivity_timer
Non-WASM fallback that does nothing (for testing)
use_is_inactive