Skip to main content

Diagnostics

Diagnostics are off by default.

import { useScheduledTimer } from '@crup/react-timer-hook/schedules';
import { consoleTimerDiagnostics } from '@crup/react-timer-hook/diagnostics';

useScheduledTimer({
autoStart: true,
diagnostics: consoleTimerDiagnostics({ label: 'auction-card' }),
});

Events are semantic: timer:start, timer:pause, timer:resume, timer:reset, timer:restart, timer:cancel, timer:end, scheduler:start, schedule:start, schedule:skip, schedule:end, schedule:error, and callback:error.

Raw timeout handles are not exposed.