userver: userver/chaotic/io/std/chrono/milliseconds.hpp Source File
Loading...
Searching...
No Matches
milliseconds.hpp
1#pragma once
2
3#include <chrono>
4
5#include <userver/chaotic/convert.hpp>
6#include <userver/utils/numeric_cast.hpp>
7
8USERVER_NAMESPACE_BEGIN
9
10namespace chaotic::convert {
11
12template <typename T>
13T Convert(std::chrono::milliseconds value, chaotic::convert::To<T>) {
14 return utils::numeric_cast<T>(value.count());
15}
16
17} // namespace chaotic::convert
18
19USERVER_NAMESPACE_END