diff options
author | Florian Westphal <fw@strlen.de> | 2018-05-09 00:52:30 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2018-05-09 09:21:07 +0200 |
commit | 9ef4f9e6fe0c766395d00701131289bc2007c23c (patch) | |
tree | b31dd884a3bc14cb32112ee4b7e3873cbe9c9e42 /src/rule.c | |
parent | 1eadd73e30deab778ddfc26e9222a4d23bedb140 (diff) |
src: support timeouts in milliseconds
currently the frontend uses seconds everywhere and
multiplies/divides by 1000.
Pass milliseconds around instead and extend the scanner to accept 'ms'
in timestrings.
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'src/rule.c')
-rw-r--r-- | src/rule.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -379,12 +379,12 @@ static void set_print_declaration(const struct set *set, if (set->timeout) { nft_print(octx, "%s%stimeout ", opts->tab, opts->tab); - time_print(set->timeout / 1000, octx); + time_print(set->timeout, octx); nft_print(octx, "%s", opts->stmt_separator); } if (set->gc_int) { nft_print(octx, "%s%sgc-interval ", opts->tab, opts->tab); - time_print(set->gc_int / 1000, octx); + time_print(set->gc_int, octx); nft_print(octx, "%s", opts->stmt_separator); } } |