From 0ddc742c04538fdd8be51fb1d4dbcbd4309952db Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 12 Mar 2019 18:56:51 +0100 Subject: watch: support fractional -n SEC function old new delta watch_main 212 232 +20 Signed-off-by: Denys Vlasenko --- include/libbb.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/libbb.h b/include/libbb.h index 3366df30f..7a1e13875 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -1040,9 +1040,11 @@ uint16_t xatou16(const char *numstr) FAST_FUNC; #if ENABLE_FLOAT_DURATION typedef double duration_t; void sleep_for_duration(duration_t duration) FAST_FUNC; +#define DURATION_FMT "f" #else typedef unsigned duration_t; #define sleep_for_duration(duration) sleep(duration) +#define DURATION_FMT "u" #endif duration_t parse_duration_str(char *str) FAST_FUNC; -- cgit v1.2.3