package 多线程技能1;
/**
* Sleep(long millis,int nanos):在指定的毫秒数加指定纳秒数内让当前正在执行的线程休眠
* ,此操作受到系统计时器和调度程序的精确度和准确性的影响
*/
class Test1{
public Test1() throws InterruptedException {
long beginTiome=System.currentTimeMillis();
Thread.sleep(2000,999);
long endTime=System.currentTimeMillis();
System.out.println(beginTiome=endTime);
}
}
public class T16 {
public static void main(String[] args) throws InterruptedException {
Test1 test1=new Test1();
}
}