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
3
#include <
yaclib/fault/detail/fiber/scheduler.hpp
>
4
5
#include <chrono>
6
7
namespace
yaclib::detail::fiber
{
8
9
struct
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
21
static
time_point
from_time_t
(
time_t
c_time_point
)
noexcept
;
22
};
23
24
}
// namespace yaclib::detail::fiber
yaclib::detail::fiber
Definition
atomic.hpp:7
yaclib::MakeContract
Contract< V, E > MakeContract()
Creates related future and promise.
Definition
contract.hpp:25
scheduler.hpp
yaclib::detail::fiber::SystemClock
Definition
system_clock.hpp:9
yaclib::detail::fiber::SystemClock::period
duration::period period
Definition
system_clock.hpp:12
yaclib::detail::fiber::SystemClock::duration
std::chrono::nanoseconds duration
Definition
system_clock.hpp:10
yaclib::detail::fiber::SystemClock::time_point
std::chrono::time_point< SystemClock > time_point
Definition
system_clock.hpp:13
yaclib::detail::fiber::SystemClock::to_time_t
static time_t to_time_t(const time_point &time_point) noexcept
Definition
system_clock.cpp:9
yaclib::detail::fiber::SystemClock::now
static time_point now()
Definition
system_clock.cpp:5
yaclib::detail::fiber::SystemClock::rep
duration::rep rep
Definition
system_clock.hpp:11
yaclib::detail::fiber::SystemClock::is_steady
static constexpr bool is_steady
Definition
system_clock.hpp:15
yaclib::detail::fiber::SystemClock::from_time_t
static time_point from_time_t(time_t c_time_point) noexcept
Definition
system_clock.cpp:14
include
yaclib
fault
detail
fiber
system_clock.hpp
Generated by
1.9.8