public class Test
{
public static void main(String[] args)
{
// long startTime = System.nanoTime(); // 纳秒级
long startTime = System.currentTimeMillis(); // 毫秒级
// 测试的代码
// long estimatedTime = System.nanoTime() - startTime;
long estimatedTime=System.currentTimeMillis() - startTime;
System.out.println(estimatedTime);
}
}