long startTime=System.currentTimeMillis();//记录开始时间 method();//此处为你调用的方法 long endTime=System.currentTimeMillis();//记录结束时间 float excTime=(float)(endTime-startTime)/1000; System.out.println("执行时间:"+excTime+"s");
Powered by: 博客园 Copyright © 2024 shenyixin Powered by .NET 8.0 on Kubernetes