Log initial PerformanceCouter frequency & epoch
This commit is contained in:
parent
78644b87dc
commit
c421b76f4c
2
player.c
2
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));
|
||||
|
4
types.c
4
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;
|
||||
|
Loading…
Reference in New Issue
Block a user