Manages heartbeat timing for the Gateway connection.
Discord requires regular heartbeats to keep the connection alive. The interval is provided by Discord in the HELLO payload.
Summary
Functions
Cancels a pending heartbeat timer.
Schedules the next heartbeat at a fixed interval.
Schedules the first heartbeat after HELLO.
Functions
@spec cancel(reference() | nil) :: :ok
Cancels a pending heartbeat timer.
Schedules the next heartbeat at a fixed interval.
Schedules the first heartbeat after HELLO.
Per Discord docs, the first heartbeat should be sent after
interval * jitter where jitter is between 0 and 1.