From f95746420875b034f39a0e8b0c7c28cc05de84ed Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sat, 11 Jan 2020 10:17:11 +0100 Subject: Base flashing colons on real time, not cue time --- glitchyclock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'glitchyclock.c') 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; -- cgit v1.2.3