Use setInterval for heartbeat