summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-01-11 10:17:11 +0100
committerThomas White <taw@physics.org>2020-01-11 10:17:11 +0100
commitf95746420875b034f39a0e8b0c7c28cc05de84ed (patch)
treee9f17153ad4afda40aac527d01a999a03a741682
parenta47ff0d5c8332970e52b840bf3388b73054e2eeb (diff)
Base flashing colons on real time, not cue time
-rw-r--r--glitchyclock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/glitchyclock.c b/glitchyclock.c
index ab69ad6..83d7244 100644
--- a/glitchyclock.c
+++ b/glitchyclock.c
@@ -140,10 +140,10 @@ static gboolean draw_sig(GtkWidget *widget, cairo_t *cr, struct glitchyclock *gc
pango_layout_set_font_description(layout, gc->fontdesc);
seconds_elapsed = get_monotonic_seconds() - gc->real_time_last_cue;
- col = (modf(seconds_elapsed, &seconds_rounded) < 0.5) ? ':' : ' ';
+ modf(seconds_elapsed, &seconds_rounded);
real_seconds_elapsed = get_monotonic_seconds() - gc->real_time_last_reset;
- modf(real_seconds_elapsed, &real_seconds_rounded);
+ col = (modf(real_seconds_elapsed, &real_seconds_rounded) < 0.5) ? ':' : ' ';
clock_hours = gc->base_hours;
clock_minutes = gc->base_minutes;
clock_seconds = gc->base_seconds + real_seconds_rounded;