Can anyone tell me how to calculate in Java the CPU time taken by a thread?