summaryrefslogtreecommitdiffstats
path: root/src/parser_bison.y
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2018-05-09 00:52:30 +0200
committerFlorian Westphal <fw@strlen.de>2018-05-09 09:21:07 +0200
commit9ef4f9e6fe0c766395d00701131289bc2007c23c (patch)
treeb31dd884a3bc14cb32112ee4b7e3873cbe9c9e42 /src/parser_bison.y
parent1eadd73e30deab778ddfc26e9222a4d23bedb140 (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/parser_bison.y')
-rw-r--r--src/parser_bison.y8
1 files changed, 4 insertions, 4 deletions
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 */ { $$ = $<set>-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 */ { $$ = $<set>-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
{
- $<expr>0->timeout = $2 * 1000;
+ $<expr>0->timeout = $2;
}
| comment_spec
{