rename timer frequency -> qpc per second
This commit is contained in:
parent
489fc8eca3
commit
aaaa7deb81
@ -99,7 +99,7 @@ struct win32_window {
|
|||||||
GLOBAL struct {
|
GLOBAL struct {
|
||||||
SYSTEM_INFO info;
|
SYSTEM_INFO info;
|
||||||
i64 timer_start_qpc;
|
i64 timer_start_qpc;
|
||||||
i64 timer_qpc_frequency;
|
i64 qpc_per_second;
|
||||||
i64 ns_per_qpc;
|
i64 ns_per_qpc;
|
||||||
i32 scheduler_period_ms;
|
i32 scheduler_period_ms;
|
||||||
DWORD thread_tls_index;
|
DWORD thread_tls_index;
|
||||||
@ -1931,7 +1931,7 @@ INTERNAL void win32_precise_sleep_timer(f64 seconds, HANDLE timer)
|
|||||||
/* TODO: Does the high frequency timer even require setting / scaling of
|
/* TODO: Does the high frequency timer even require setting / scaling of
|
||||||
* timeBeginPeriod/scheduler_period_ms? There isn't much documentation. */
|
* timeBeginPeriod/scheduler_period_ms? There isn't much documentation. */
|
||||||
|
|
||||||
i64 qpc_per_second = G.timer_qpc_frequency;
|
i64 qpc_per_second = G.qpc_per_second;
|
||||||
i32 scheduler_period_ms = G.scheduler_period_ms;
|
i32 scheduler_period_ms = G.scheduler_period_ms;
|
||||||
|
|
||||||
LARGE_INTEGER qpc;
|
LARGE_INTEGER qpc;
|
||||||
@ -1972,7 +1972,7 @@ INTERNAL void win32_precise_sleep_timer(f64 seconds, HANDLE timer)
|
|||||||
INTERNAL void win32_precise_sleep_legacy(f64 seconds)
|
INTERNAL void win32_precise_sleep_legacy(f64 seconds)
|
||||||
{
|
{
|
||||||
__prof;
|
__prof;
|
||||||
i64 qpc_per_second = G.timer_qpc_frequency;
|
i64 qpc_per_second = G.qpc_per_second;
|
||||||
i32 scheduler_period_ms = G.scheduler_period_ms;
|
i32 scheduler_period_ms = G.scheduler_period_ms;
|
||||||
|
|
||||||
LARGE_INTEGER qpc;
|
LARGE_INTEGER qpc;
|
||||||
@ -2063,7 +2063,7 @@ int CALLBACK wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev_instance,
|
|||||||
|
|
||||||
LARGE_INTEGER qpf;
|
LARGE_INTEGER qpf;
|
||||||
QueryPerformanceFrequency(&qpf);
|
QueryPerformanceFrequency(&qpf);
|
||||||
G.timer_qpc_frequency = qpf.QuadPart;
|
G.qpc_per_second = qpf.QuadPart;
|
||||||
G.ns_per_qpc = 1000000000 / qpf.QuadPart;
|
G.ns_per_qpc = 1000000000 / qpf.QuadPart;
|
||||||
|
|
||||||
LARGE_INTEGER qpc;
|
LARGE_INTEGER qpc;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user