Use the SPINWAIT variable for the heartbeat sleep.