HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
awaitable_timer.hpp
1// Copyright Take Vos 2022.
2// Distributed under the Boost Software License, Version 1.0.
3// (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
4
5#pragma once
6
7#include "chrono.hpp"
8
9namespace hi::inline v1 {
10
12public:
13 awaitable_timer(utc_nanoseconds deadline) noexcept : _deadline(deadline) {}
14
15 awaitable_timer(std::chrono::nanoseconds period) noexcept : awaitable_timer(std::chrono::utc_clock::now() + period) {}
16
17private:
18 utc_nanoseconds _deadline;
19};
20
21} // namespace hi::inline v1
Definition awaitable_timer.hpp:11