Code example for ScheduledExecutorService

Methods: shutdown

0
		// 30Ãëºó½áÊø¹Ø±ÕÈÎÎñ£¬²¢ÇҹرÕScheduler 
		scheduler.schedule(new Runnable() {
			public void run() { 
				beeperHandle.cancel(true);
				beeperHandle2.cancel(true);
				scheduler.shutdown();
			} 
		}, 30, SECONDS);
	} 
} 
Contextual code suggestions in your IDE  Get Codota for Java