From f41599c8e9435f3dfec60b872c2b4ae31177efdd Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sat, 10 Oct 2020 17:22:46 +0300 Subject: Add support for test timeouts --- libbuild2/utility.hxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libbuild2/utility.hxx') diff --git a/libbuild2/utility.hxx b/libbuild2/utility.hxx index 4560a73..7dbff2f 100644 --- a/libbuild2/utility.hxx +++ b/libbuild2/utility.hxx @@ -798,6 +798,13 @@ namespace build2 { return apply_pattern (s, p.c_str ()); } + + // Try to parse a string as a non-negative number returning nullopt if the + // argument is not a valid number or the number is greater than the + // specified maximum. + // + optional + parse_number (const string&, uint64_t max = UINT64_MAX); } #include -- cgit v1.1