From c421b76f4cfdbf9cad991617e2a7d3d9834dce67 Mon Sep 17 00:00:00 2001 From: Edgaru089 Date: Tue, 26 Mar 2024 14:22:35 +0800 Subject: [PATCH] Log initial PerformanceCouter frequency & epoch --- player.c | 2 +- types.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/player.c b/player.c index 6dcbaa2..129f294 100644 --- a/player.c +++ b/player.c @@ -80,7 +80,7 @@ void player_Advance(System_Player *sys, Duration deltaTime) { // Particles when dashing if (time_Since(p->lastDash).microseconds < dashLength.microseconds && dabs(p->super->position->velocity.x) > EPS) { static TimePoint lastDashEmit = {}; - static Duration cooldown = {.microseconds = 10000}; + static Duration cooldown = {.microseconds = 8000}; if (time_Since(lastDashEmit).microseconds > cooldown.microseconds) { lastDashEmit = time_Now(); Vec2 to_pos = vec2_Add(p->super->position->position, vec2(0, -p->super->hitbox->box.size.y / 2.0)); diff --git a/types.c b/types.c index 6c784cc..9ff02b1 100644 --- a/types.c +++ b/types.c @@ -146,6 +146,10 @@ TimePoint time_Now() { LARGE_INTEGER freq; QueryPerformanceFrequency(&freq); freqInverse = 1000000.0 / ((double)freq.QuadPart); + + LARGE_INTEGER time; + QueryPerformanceCounter(&time); + fprintf(stderr, "[time_Now] Frequency=%llu, Epoch=%llu\n", freq.QuadPart, time.QuadPart); } LARGE_INTEGER time;