summaryrefslogtreecommitdiff
path: root/snooze.c
diff options
context:
space:
mode:
authorHendrik Jäger <gitcommit@henk.geekmail.org>2020-12-23 00:13:05 +0100
committerHendrik Jäger <gitcommit@henk.geekmail.org>2020-12-23 00:13:05 +0100
commitb693f9aa9bc33d512e6f6a8560fb5254b33c5275 (patch)
tree58682944dacbbc3a6b172a8767386099dca937f5 /snooze.c
parent2de8262c590c5de28a1761be531ccf8453cd8129 (diff)
Change timefile calculations to respect slackfix-slack-issue
% touch -t $(date -d '7 days ago' +%Y%m%d0000) somefile % ls -l somefile -rw-r--r-- 1 henk henk 0 Dez 16 00:00 somefile Before this change: % /usr/bin/snooze -nv -s 30d -H 5 -t somefile -T 30m 2020-12-23T05:00:00+0100 Wed 0d 4h 32m 24s 2020-12-24T05:00:00+0100 Thu 1d 4h 32m 24s 2020-12-25T05:00:00+0100 Fri 2d 4h 32m 24s 2020-12-26T05:00:00+0100 Sat 3d 4h 32m 24s 2020-12-27T05:00:00+0100 Sun 4d 4h 32m 24s After this change: % ./snooze -nv -s 30d -H 5 -t somefile -T 30m 2020-12-16T05:00:00+0100 Wed -6d-19h-27m-43s 2020-12-17T05:00:00+0100 Thu -5d-19h-27m-43s 2020-12-18T05:00:00+0100 Fri -4d-19h-27m-43s 2020-12-19T05:00:00+0100 Sat -3d-19h-27m-43s 2020-12-20T05:00:00+0100 Sun -2d-19h-27m-43s
Diffstat (limited to 'snooze.c')
-rw-r--r--snooze.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/snooze.c b/snooze.c
index 730fb4b..1301c76 100644
--- a/snooze.c
+++ b/snooze.c
@@ -301,7 +301,7 @@ main(int argc, char *argv[])
t = find_next(t + 1);
start = t;
} else {
- if (t + timewait > start)
+ if (t + timewait > start - slack)
start = st.st_mtime + timewait;
}
}