(idleThresholdMs: number = 30_000)
| 36 | * @param idleThresholdMs - Time in ms to consider user idle (default: 30 seconds) |
| 37 | */ |
| 38 | export function isUserActive(idleThresholdMs: number = 30_000): boolean { |
| 39 | return Date.now() - lastActivityTime < idleThresholdMs |
| 40 | } |
| 41 | |
| 42 | /** |
| 43 | * Get the time in ms since the last activity. |
no outgoing calls
no test coverage detected