package general;

import java.util.concurrent.TimeUnit;

public class Timer {

    public static final TimeUnit TIME_UNIT = TimeUnit.NANOSECONDS;
    private long start = 0;
    private long end = 0;

    public static Timer start() {
        return new Timer();
    }

    public void reset() {
        _start();
    }

    public long startTime(TimeUnit timeUnit) {
        return timeUnit.convert(start, TIME_UNIT);
    }

    public long endTime(TimeUnit timeUnit) {
        return timeUnit.convert(end, TIME_UNIT);
    }

    public long elapsedTime(TimeUnit timeUnit) {
        end = System.nanoTime();
        return timeUnit.convert(end - start, TIME_UNIT);
    }

    public long elapsedTime() {
        return elapsedTime(TIME_UNIT);
    }

    private Timer() {
        _start();
    }

    private void _start() {
        start = System.nanoTime();
    }

}

@@ -192,16 +192,86 @@
 end = 0;
+%0A    private long startWallTime = 0;%0A    private long endWallTime = 0;
 %0A%0A    pu
@@ -442,33 +442,33 @@
      return 
-t
+T
 imeUnit.
 convert(star
@@ -459,32 +459,52 @@
 nit.
-convert(start, TIME_UNIT
+MILLISECONDS.convert(startWallTime, timeUnit
 );%0A 
@@ -565,33 +565,33 @@
      return 
-t
+T
 imeUnit.
 convert(end,
@@ -582,30 +582,50 @@
 nit.
-convert(end, TIME_UNIT
+MILLISECONDS.convert(endWallTime, timeUnit
 );%0A 
@@ -708,24 +708,74 @@
 nanoTime();%0A
+        endWallTime = System.currentTimeMillis();%0A
         retu
@@ -1010,21 +1010,73 @@
 nanoTime();%0A
+        startWallTime = System.currentTimeMillis();%0A
     %7D%0A%0A%7D%0A

Fix timer