@Override public void run() { super.run(); synchronized(this) { // Task may have rescheduled itself without actually running. // If we schedule again, it will be stuck in a scheduling loop. // This happens after a backwards clock shift. if (_state == TimedEventState.IDLE) schedule(_timeoutMs); } } }