From 02de56dfa9413b13ffcc7ceb19fc0e5d86bcbdc5 Mon Sep 17 00:00:00 2001 From: Lexi Quinn Date: Fri, 28 Jan 2022 20:24:22 +1100 Subject: [PATCH] fix deltas zeroing at the end of a pb run --- src/timer.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/timer.c b/src/timer.c index 957209e..eb40e55 100644 --- a/src/timer.c +++ b/src/timer.c @@ -53,6 +53,8 @@ void start() { if (timerActive || segCount == 0) return; + //for now we do this here for reasons explained in stop() + calculatePB(); clock_gettime(CLOCK_REALTIME, ×tart); timerActive = true; //Reset state of timer @@ -84,7 +86,10 @@ void stop() t.isReset = segments[i].isReset; pastRuns[((attempts-1) * segCount) + i] = t; } - calculatePB(); + //If this is done here you wont get a chance to peep your deltas on + //a pb coz the ui will just update and zero them all out if your current + //run is the pb run youre now comparing to + //calculatePB(); saveFile(); }