userver
C++ Async Framework
Toggle main menu visibility
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
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Concepts
Loading...
Searching...
No Matches
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
>
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
(
const
std::string& data);
23
24
}
// namespace utils
25
26
USERVER_NAMESPACE_END
userver
utils
string_to_duration.hpp
Generated on Wed Apr 30 2025 15:48:43 for userver by
Doxygen
1.13.2