snore

sleep with feedback
git clone git://git.bitsmanent.org/snore
Log | Files | Refs | README | LICENSE

commit dae99ce6986d51a4329dd6b6a3ed4c8878a6b589
parent d18b177e34bf55dc2b99e390dce04ecbea8c3fea
Author: Claudio Alessi <smoppy@gmail.com>
Date:   Tue, 26 Sep 2017 21:17:00 +0200

Restore fflush(): this solves an annoying visual glitch.

Diffstat:
Msnore.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/snore.c b/snore.c @@ -108,7 +108,6 @@ main(int argc, char *argv[]) { if(argc == 2 && !strcmp("-v", argv[1])) die("snore-"VERSION"\n"); - setbuf(stdout, NULL); for(i = 1; i < argc; ++i) { tm = time_to_sec(argv[i]); if(tm < 0) @@ -123,6 +122,7 @@ main(int argc, char *argv[]) { time_print(tm); /* ascending */ printf(" | "); time_print(endtm - tm); /* descending */ + fflush(stdout); sleepu(TICK); printf(CLEAR); }