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