Skip to content
Discussion options

You must be logged in to vote

Create it with createHeartbeat({ interval, onBeat }), call start() while the status check is active, then call stop() when the check finishes. stop() clears the interval and returns snapshot() with running, count, startedAt, lastBeatAt, and interval; listeners can use onBeat(handler) and keep the unsubscribe function.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by clyxudev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants