package com.puzzletimer.models;

import java.util.Date;

public class Timing {
    private Date start;
    private Date end;

    public Timing(Date start, Date end) {
        this.start = start;
        this.end = end;
    }

    public Date getStart() {
        return this.start;
    }

    public Date getEnd() {
        return this.end;
    }

    public long getElapsedTime() {
        if (this.end != null) {
            return this.end.getTime() - this.start.getTime();
        }

        return new Date().getTime() - this.start.getTime();
    }
}

@@ -411,12 +411,27 @@
     
-if (
+long elapsedTime = 
 this
@@ -439,18 +439,17 @@
 end 
-!
+=
 = null
-) %7B
+ ?
 %0D%0A  
@@ -458,31 +458,26 @@
         
-return this.end
+new Date()
 .getTime
@@ -497,25 +497,26 @@
 rt.getTime()
-;
+ :
 %0D%0A        %7D%0D
@@ -517,38 +517,20 @@
     
-%7D%0D%0A%0D%0A        return new Date()
+    this.end
 .get
@@ -560,16 +560,134 @@
 Time();%0D
+%0A%0D%0A        // truncate to centiseconds%0D%0A        elapsedTime = 10 * (elapsedTime / 10);%0D%0A%0D%0A        return elapsedTime;%0D
 %0A    %7D%0D%0A

Times truncated to centiseconds