YACLib
C++ library for concurrent tasks execution
Loading...
Searching...
No Matches
system_clock.hpp
Go to the documentation of this file.
1#pragma once
2
4
5#include <chrono>
6
7namespace yaclib::detail::fiber {
8
9struct SystemClock {
10 using duration = std::chrono::nanoseconds;
11 using rep = duration::rep;
12 using period = duration::period;
13 using time_point = std::chrono::time_point<SystemClock>;
14
15 static constexpr bool is_steady = true;
16
17 static time_point now();
18
19 static time_t to_time_t(const time_point& time_point) noexcept;
20
22};
23
24} // namespace yaclib::detail::fiber
Contract< V, E > MakeContract()
Creates related future and promise.
Definition contract.hpp:25
std::chrono::nanoseconds duration
std::chrono::time_point< SystemClock > time_point
static time_t to_time_t(const time_point &time_point) noexcept
static time_point from_time_t(time_t c_time_point) noexcept