userver
C++ Async Framework
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 Dec 4 2024 18:42:04 for userver by
Doxygen
1.10.0