@@ -0,0 +1,971 @@
+package juc;%0A%0Aimport java.util.concurrent.TimeUnit;%0A%0A/**%0A * Created by %E6%9D%8E%E6%81%92%E5%90%8D on 2017/6/17.%0A */%0Apublic class TimeUnitTest %7B%0A%0A    public static void main(String%5B%5D args) throws InterruptedException %7B%0A        //%E7%9D%A1%E7%9C%A013%E5%88%86%E9%92%9F%0A        TimeUnit.MINUTES.sleep(13);%0A        //Thread.sleep(780000);//%E8%BF%99%E6%A0%B7%E5%86%99%E4%BD%A0%E7%9F%A5%E9%81%93%E6%98%AF%E5%A4%9A%E4%B9%85%E5%90%97%EF%BC%9F%0A        //Thread.sleep(13*60*1000);//%E8%BF%99%E6%A0%B7%E5%86%99%E4%BC%9A%E7%A8%8D%E5%BE%AE%E5%A5%BD%E4%BA%9B%0A%0A        //%E7%9D%A1%E7%9C%A01%E5%B0%8F%E6%97%B6%0A        TimeUnit.HOURS.sleep(1);%0A        //Thread.sleep(3600000);%0A%0A        TimeUnitTest test = new TimeUnitTest();%0A%0A        Thread thread = new Thread(() -%3E test.work());%0A%0A        //10%E7%A7%92%E5%86%85Join%0A        TimeUnit.SECONDS.timedJoin(thread,10);%0A        //thread.join(10000);%0A%0A%0A    %7D%0A%0A    public  synchronized  void work() %7B%0A        System.out.println(%22Begin Work%22);%0A        try %7B%0A            //%E7%AD%89%E5%BE%8530%E7%A7%92%E5%90%8E%EF%BC%8C%E8%87%AA%E5%8A%A8%E5%94%A4%E9%86%92%E7%BB%A7%E7%BB%AD%E6%89%A7%E8%A1%8C%0A            TimeUnit.SECONDS.timedWait(this, 30);%0A            //wait(30000);%0A        %7D catch (InterruptedException e) %7B%0A            e.printStackTrace();%0A        %7D%0A        System.out.println(%22Work End%22);%0A    %7D%0A%0A%7D%0A

add > juc TimeUnit test code