ubase

suckless linux base utils
git clone git://git.2f30.org/ubase.git
Log | Files | Refs | README | LICENSE

commit 238901b872e25a0d7aee150da49a0b74cb3f4a18
parent 19634fa7b3075231bca065283cb2f094a4098b73
Author: sin <sin@2f30.org>
Date:   Sun Nov 30 14:08:20 +0000

watch: If period is negative default to 0.1s

Diffstat:
watch.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/watch.c b/watch.c @@ -28,6 +28,8 @@ main(int argc, char *argv[]) period = strtof(EARGF(usage()), &end); if (*end != '\0' || errno != 0) eprintf("invalid interval\n"); + if (period < 0) + period = 0.1f; interval = period * 1E6; break; default: