Posted on
2018-03-28 21:22shenyixin
阅读(1292)
评论(0)
收藏举报
long startTime=System.currentTimeMillis();//记录开始时间
method();//此处为你调用的方法 long endTime=System.currentTimeMillis();//记录结束时间 float excTime=(float)(endTime-startTime)/1000;
System.out.println("执行时间:"+excTime+"s");