summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimeon Simeonov2020-12-28 15:06:35 +0100
committerSimeon Simeonov2020-12-28 15:06:35 +0100
commit9ba9b861648b8e3aae1599866c07e7872ce01a3e (patch)
treed42b35e15a6ce5383d9415749e5302034d87c47c
parent6832b77325ddc23e8a12a292d3fe4fa2d1a9db56 (diff)
Display blinking text when count until has passed
-rw-r--r--extras.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/extras.c b/extras.c
index bde4172..fa78c86 100644
--- a/extras.c
+++ b/extras.c
@@ -510,6 +510,13 @@ char * i3lock_format_elapsed_time(char *to,
510 510
511 char tmp_str[max_size]; 511 char tmp_str[max_size];
512 char int_str[32]; /* more than enough for int */ 512 char int_str[32]; /* more than enough for int */
513
514 if (seconds < 0) {
515 if (!(seconds % 3))
516 return NULL;
517 seconds = 0;
518 }
519
513 int days = seconds / 86400; 520 int days = seconds / 86400;
514 int hours = (seconds - days * 86400) / 3600; 521 int hours = (seconds - days * 86400) / 3600;
515 int minutes = (seconds - days * 86400 - hours * 3600) / 60; 522 int minutes = (seconds - days * 86400 - hours * 3600) / 60;