HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
audio_counter_clock.hpp
1// Copyright Take Vos 2019.
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 "os_detect.hpp"
8#include <chrono>
9#if TT_COMPILER == TT_CC_MSVC
10#include <intrin.h>
11#elif TT_COMPILER == TT_CC_CLANG
12#include <x86intrin.h>
13#elif TT_COMPILER == TT_CC_GCC
14#include <x86intrin.h>
15#endif
16
17namespace tt {
18
20 using rep = uint64_t;
21 // Technically not nano-seconds, this just a counter.
22 using period = std::nano;
25 static const bool is_steady = true;
26
27 static audio_counter_clock::time_point from_audio_api(uint64_t value) noexcept;
28
29 static audio_counter_clock::time_point now() noexcept;
30};
31
32}
Definition audio_counter_clock.hpp:19