HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
src
hikogui
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
9
namespace
hi::inline v1 {
10
11
class
awaitable_timer
{
12
public
:
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
17
private
:
18
utc_nanoseconds _deadline;
19
};
20
21
}
// namespace hi::inline v1
v1::awaitable_timer
Definition
awaitable_timer.hpp:11
std::chrono::nanoseconds
Generated on Mon Apr 22 2024 12:53:25 for HikoGUI by
1.10.0