From 9ef4f9e6fe0c766395d00701131289bc2007c23c Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Wed, 9 May 2018 00:52:30 +0200 Subject: 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 --- src/parser_bison.y | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/parser_bison.y') diff --git a/src/parser_bison.y b/src/parser_bison.y index 7238a94e..24210b2b 100644 --- a/src/parser_bison.y +++ b/src/parser_bison.y @@ -1496,12 +1496,12 @@ set_block : /* empty */ { $$ = $-1; } } | set_block TIMEOUT time_spec stmt_separator { - $1->timeout = $3 * 1000; + $1->timeout = $3; $$ = $1; } | set_block GC_INTERVAL time_spec stmt_separator { - $1->gc_int = $3 * 1000; + $1->gc_int = $3; $$ = $1; } | set_block ELEMENTS '=' set_block_expr @@ -1544,7 +1544,7 @@ map_block : /* empty */ { $$ = $-1; } | map_block stmt_separator | map_block TIMEOUT time_spec stmt_separator { - $1->timeout = $3 * 1000; + $1->timeout = $3; $$ = $1; } | map_block TYPE @@ -3052,7 +3052,7 @@ set_elem_options : set_elem_option set_elem_option : TIMEOUT time_spec { - $0->timeout = $2 * 1000; + $0->timeout = $2; } | comment_spec { -- cgit v1.2.3