Difference between TimeUnit and Thread Sleep in Java

Tutorials Shared by the Internet Community

Advertisements


Synopsis

TimeUnit has a sleep method similar to java.lang.Thread sleep() method, which can be used to introduce pause in Java program. This tutorial advise why

Statistics

  • Total Hits - 18248

  • Total Votes - 99 votes

  • Vote Up - 43 votes

  • Vote Down - 56 votes

  • Domain - javarevisited.blogspot.com

  • Category - JAVA/JAVA Misc

  • Submitted By - Javin Paul

  • Submitted on - 2013-05-10 16:12:48

Description

TimeUnit has a sleep method similar to java.lang.Thread sleep() method, which can be used to introduce pause in Java program. This tutorial advise why you should use TimeUnit sleep() method instead of thread sleep() method. ...


Site  |   Broken  |   Tweet  |   Facebook  |     |   Save  |   Liked  |   Down

Advertisements