package com.mars.test.java;

import com.google.common.base.Stopwatch;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;

import java.util.concurrent.TimeUnit;

/**
 * Created by USER on 2017/6/16.
 */
@Slf4j
public class TestSleep {

    @Test
    public void tesSleep() throws InterruptedException {
        Stopwatch stopwatch = Stopwatch.createStarted();
        TimeUnit.SECONDS.sleep(3);
        log.info("timer =" + stopwatch.toString());
    }

}

@@ -452,10 +452,227 @@
 %0A    %7D%0A%0A
+    @Test%0A    public void testSleep2() throws InterruptedException %7B%0A        Stopwatch stopwatch = Stopwatch.createStarted();%0A        Thread.sleep(3 * 1000);%0A        log.info(%22timer =%22 + stopwatch.toString());%0A    %7D%0A%0A
 %7D%0A

add thread sleep