Better interal locking of TimerTask.