Use internal SNAPSHOT couplings again
[trakem2.git] / TrakEM2_ / src / main / java / ini / trakem2 / utils / StopWatch.java
blobc4559fc63217d039d4d407cf13fbe358b84daea9
1 package ini.trakem2.utils;
3 public class StopWatch {
5 private long start;
6 private long start2;
8 public StopWatch() {
9 this("");
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);
19 start2 = now;
21 /** Total time transcurred from the start. */
22 public void cumulative() {
23 long now = System.currentTimeMillis();
24 Utils.log("Cumulative: " + (now - start));