1 package ini
.trakem2
.utils
;
3 public class StopWatch
{
9 start
= start2
= System
.currentTimeMillis();
10 System
.out
.println("StopWatch started.");
12 /** Time elapsed since last call to this method or the start. */
13 public void elapsed(String msg
) {
14 long now
= System
.currentTimeMillis();
15 Utils
.log("Elapsed: " + (now
- start2
) + " at: " + msg
);
18 /** Total time transcurred from the start. */
19 public void cumulative() {
20 long now
= System
.currentTimeMillis();
21 Utils
.log("Cumulative: " + (now
- start
));