3334353637383940414243
System.out.printf("Main: %s\n",new Date()); /* * Send to the executor a delayed task. It will be executed after 1 second of delay */ executor.schedule(task, 1, TimeUnit.SECONDS); /* * Sleeps the thread three seconds */ TimeUnit.SECONDS.sleep(3);