TimeMeasure

purpose:masure the time used with a strcut

method:   duration=endTime-startTime;

realization:

1.startTime

long start=System.nanoTime();

2.do the work needs to measure

...

3.duration

long duration =(System.nanoTime()-start)/1_000_000;

ps:time measured with msecs

原文地址:https://www.cnblogs.com/ssMellon/p/7144285.html