Java中的System.currentTimeMills()函数产生一个当前时间----1970年1月1日0时起的毫秒数。
该函数可以用来统计程序运行时间,如:
long start=System.currentTimeMills();
long end=System.currentTimeMills();
System.out.println("运行时间:"+(end-start));
Java中的System.currentTimeMills()函数产生一个当前时间----1970年1月1日0时起的毫秒数。
该函数可以用来统计程序运行时间,如:
long start=System.currentTimeMills();
long end=System.currentTimeMills();
System.out.println("运行时间:"+(end-start));