summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2019-01-01 14:48:32 -0700
committerEduardo Chappa <chappa@washington.edu>2019-01-01 14:48:32 -0700
commita43c686472a0c28742d78667f320b6632453cd0f (patch)
tree5d22245b7d5063a1624957aa04c4a3d47426b824
parent2e921f97bd1278a800acadcea21dbf7bf58ea51c (diff)
downloadalpine-a43c686472a0c28742d78667f320b6632453cd0f.tar.xz
* 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.
-rw-r--r--alpine/status.c4
1 files changed, 4 insertions, 0 deletions
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);