📜  java程序的运行时间-Java代码示例

📅  最后修改于: 2022-03-11 14:52:44.013000             🧑  作者: Mango

代码示例1
long startTime = System.nanoTime();
.....your program....
long endTime   = System.nanoTime();
long totalTime = endTime - startTime;
System.out.println(totalTime);