Wait for all the threads to finish their job and then measure the time elapsed
问题 I am using Executor service in one of my Multithreaded code . I am trying to see whether all of my threads are finished doing their job then afterwards I need to do certain task. Currently I need to measure the time elapsed, so I can only measure the time elapsed only after all the threads has finished executing there job. So I have this code currently? And I am measuring time elapsed in the finally block . ExecutorService service = Executors.newFixedThreadPool(noOfThreads); long startTime =