userver
C++ Async Framework
Documentation
API Groups
Namespaces
Reference
Class List
Class Index
File List
Macros
All
e
i
l
r
t
u
Functions
Macros
e
i
l
r
t
u
Examples
Toggle main menu visibility
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Concepts
Loading...
Searching...
No Matches
All results
string_to_duration.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/utils/string_to_duration.hpp
4
/// @brief @copybrief utils::StringToDuration
5
/// @ingroup userver_universal
6
7
#
include
<
chrono
>
8
#
include
<
string_view
>
9
10
USERVER_NAMESPACE_BEGIN
11
12
namespace
utils
{
13
14
/// @brief Converts strings like "10s", "5d", "1h" to durations
15
///
16
/// Understands the following suffixes:
17
/// s - seconds
18
/// ms - milliseconds
19
/// m - minutes
20
/// h - hours
21
/// d - days
22
std::chrono::milliseconds
StringToDuration
(std::string_view data);
23
24
}
// namespace utils
25
26
USERVER_NAMESPACE_END
userver
utils
string_to_duration.hpp
Generated on Tue Sep 2 2025 12:30:07 for userver by
Doxygen
1.13.2