YACLib
C++ library for concurrent tasks execution
Loading...
Searching...
No Matches
system_clock.cpp
Go to the documentation of this file.
2
3namespace yaclib::detail::fiber {
4
8
10 return static_cast<std::time_t>(
11 std::chrono::duration_cast<std::chrono::seconds>(time_point.time_since_epoch()).count());
12}
13
15 return std::chrono::time_point_cast<SystemClock::duration>(
16 std::chrono::time_point<SystemClock, std::chrono::seconds>(std::chrono::seconds(c_time_point)));
17}
18
19} // namespace yaclib::detail::fiber
std::uint64_t GetTimeNs() const noexcept
Definition scheduler.cpp:67
static Scheduler * GetScheduler() noexcept
Definition scheduler.cpp:30
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