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

 

posted @ 2017-07-10 09:20  空山皓月  阅读(230)  评论(0编辑  收藏  举报