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