From a43c686472a0c28742d78667f320b6632453cd0f Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Tue, 1 Jan 2019 14:48:32 -0700 Subject: * An addition to the previous commit, to add another check that we do not sleep for too long when there are changes in the clock. --- alpine/status.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/alpine/status.c b/alpine/status.c index fcfcdfda..b28982b3 100644 --- a/alpine/status.c +++ b/alpine/status.c @@ -258,6 +258,10 @@ pause_for_and_mark_specific_msg(SMQ_T *msg) int w; w = (int) (displayed_time - time(0)) + msg->min_display_time; + if (w < 0 || w > 5){ + w = msg->min_display_time > 5 ? 5 : msg->min_display_time; + displayed_time = time(0); + } w = (w > 0) ? w : 0; if(w){ delay_cmd_cue(1); -- cgit v1.2.3-54-g00ecf