watch: support fractional -n SEC
function old new delta watch_main 212 232 +20 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user