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