public void tick ( ) throws InterruptedException { try ( LockResource r = new LockResource ( mLock ) ) { HeartbeatScheduler . addTimer ( this ) ; // Wait in a loop to handle spurious wakeups while ( ! mScheduled ) { mTickCondition . await ( ) ; } mScheduled = false ; } }
Waits until the heartbeat is scheduled for execution .