package com.validation.manager.core.tool;

/**
 *
 * @author Javier A. Ortiz Bultron <javier.ortiz.78@gmail.com>
 */
public class Timer {

    private long start, end;

    public Timer() {
        reset();
    }

    public void stop() {
        end = System.nanoTime();
    }
    
    public void reset(){
        start = System.nanoTime();
    }

    public String elapsedTime() {
        long timeelapsed = (end - start);
        long milliseconds = timeelapsed / 1000;
        long seconds = (timeelapsed / 1000) % 60;
        long minutes = (timeelapsed / 60000) % 60;
        return "Time Elapsed: " + timeelapsed + ", Start Time:" + start
                + ", end Time: " + end + " (" + minutes + ":" + seconds 
                + ":" + milliseconds + " )";
    }
}

@@ -288,20 +288,16 @@
 %0A    %7D%0D%0A
-    
 %0D%0A    pu
@@ -297,24 +297,30 @@
 %0A    public 
+final 
 void reset()
@@ -319,16 +319,17 @@
  reset()
+ 
 %7B%0D%0A     
@@ -616,107 +616,8 @@
 turn
- %22Time Elapsed: %22 + timeelapsed + %22, Start Time:%22 + start%0D%0A                + %22, end Time: %22 + end +
  %22 (
@@ -643,17 +643,16 @@
  seconds
- 
 %0D%0A      

Fix output of timer.