标签:耗时
final long startTime = System.currentTimeMillis();
Thread.currentThread().sleep(10000);
final long endTime = System.currentTimeMillis();
final long time = endTime - startTime;
System.out.println(time);
final long diffSeconds = time / 1000 % 60;
final long diffMinutes = time / (60 * 1000) % 60;
final long diffHours = time / (60 * 60 * 1000);
System.out.println(diffSeconds);
System.out.println(diffMinutes);
System.out.println(diffHours);
标签:耗时
原文地址:http://5618698.blog.51cto.com/5608698/1636372