question: public void stop ( ) { long now = System . currentTimeMillis ( ) ; synchronized ( timerThread ) { synchronized ( this ) { if ( ! stopped ) { TimerThread . dequeue ( this ) ; remainingTime = Math . max ( 0 , sleepUntil - now ) ; sleepUntil = now ; stopped = true ; } } } }
target:  Stops the timer.  The amount of time the timer has already delayed is saved so if the timer is continued, it will only delay for the amount of time remaining. Note that even after stopping a timer, one more tick may still occur. This method is MT-safe; i.e. it is synchronized but for implementation reasons, the synchronized modifier cannot be included in the method declaration.