HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
src
TTauri
Foundation
audio_counter_clock.hpp
1
// Copyright 2019 Pokitec
2
// All rights reserved.
3
4
#pragma once
5
6
#include "TTauri/Foundation/os_detect.hpp"
7
#include <chrono>
8
#if TT_COMPILER == TT_CC_MSVC
9
#include <intrin.h>
10
#elif TT_COMPILER == TT_CC_CLANG
11
#include <x86intrin.h>
12
#elif TT_COMPILER == TT_CC_GCC
13
#include <x86intrin.h>
14
#endif
15
16
namespace
tt {
17
18
struct
audio_counter_clock
{
19
using
rep = uint64_t;
20
// Technically not nano-seconds, this just a counter.
21
using
period
=
std::nano
;
22
using
duration
=
std::chrono::duration<rep, period>
;
23
using
time_point
=
std::chrono::time_point<audio_counter_clock>
;
24
static
const
bool
is_steady =
true
;
25
26
static
audio_counter_clock::time_point
from_audio_api(uint64_t value)
noexcept
;
27
28
static
audio_counter_clock::time_point
now()
noexcept
;
29
};
30
31
}
tt::audio_counter_clock
Definition
audio_counter_clock.hpp:18
std::chrono::duration< rep, period >
std::nano
std::chrono::time_point
Generated on Mon Apr 22 2024 12:53:55 for HikoGUI by
1.10.0