Code example for ScheduledExecutorService

Methods: isShutdown, shutdownNow

0
		mUpdater.schedule(new UpdateCounterTask(), 200,
				TimeUnit.MILLISECONDS);
	} 
 
	private void stopUpdating() { 
		if(mUpdater!=null&&!mUpdater.isShutdown()){
			mUpdater.shutdownNow();
			mUpdater = null;
		} 
	} 
 
	private class UpdateCounterTask implements Runnable {
		public void run() { 
 
			try { 
				if ( mHandler != null  ) {
 
					mHandler.sendEmptyMessage(0);
				} 
			} catch (Exception e) {
				// TODO Auto-generated catch block