The java.util.concurrent concurrency Library is a new JDK1.5, the author of Doug Lea, who is a boss-level genius. With the class library He provides, we have a lot of help for multithreading concurrency and lock, which reduces the concurrency difficulty, And the synchronized synchronization with Java itself has a great performance boost. Readlock, Writelock makes the control less powerful and more accurate.
Timeunit is an enumeration type that can convert time quickly and easily to (days, hours, minutes, seconds, nanoseconds) Day,hour,minute,second,millli ...
With this class we can easily convert the time
For example:
1, we will convert 1 hours to how many minutes, how many seconds
1-hour conversion minutes to 60 Minutes
TimeUnit.HOURS.toMinutes (1) =>60
1-hour conversion minutes to 3,600 seconds
TimeUnit.HOURS.toMinutes (1) =>3600
2, if the second conversion to hours, minutes
3,600 seconds conversion minutes to 60 Minutes
TimeUnit.SECONDS.toMinutes (3600) =>60
3,600-second conversion hours to 1 hours
TimeUnit.SECONDS.toHours (3600) =>1
Java.util.concurrent-------Timeunit