start

fun start(restart: Boolean = true)

Starts the execution of this heartbeat.

If the heartbeat is already running, this function behaves based on the restart parameter:

  • If restart is true, the current heartbeat execution is stopped and a new one is started.

  • If restart is false, the function does nothing and the current heartbeat continues running.

Parameters

restart

Indicates whether to restart the heartbeat if it's already running.