可以在程序开始执行的地方加上下面这句话
long tm =System.currentTimeMillis();
然后在程序处理结束的前面加上
System.out.println(System.currentTimeMillis()-long);
此单位是ms
long tm =System.currentTimeMillis();
然后在程序处理结束的前面加上
System.out.println(System.currentTimeMillis()-long);
此单位是ms