update pointer alignment rule

This commit is contained in:
2025-09-09 16:17:02 +02:00
parent c339accedc
commit cfad7f6fdc
19 changed files with 50 additions and 50 deletions

View File

@@ -8,14 +8,14 @@
#endif
#if __has_include(<features.h>) && _POSIX_C_SOURCE >= 199309L
#include <bits/time.h>
static void gettime(struct timespec* ts) {
static void gettime(struct timespec *ts) {
clock_gettime(CLOCK_MONOTONIC, ts);
}
#elif defined(_WIN32)
#include <profileapi.h>
#include <windows.h>
#include <winnt.h>
static void gettime(struct timespec* ts) {
static void gettime(struct timespec *ts) {
LARGE_INTEGER cnt, frq;
QueryPerformanceCounter(&cnt);
QueryPerformanceFrequency(&frq);
@@ -32,7 +32,7 @@ time_t time_pull(void) {
return ts.tv_sec * 1000 + ts.tv_nsec / 1000000;
}
int time_poll(time_t curr, time_t delta, time_t* restrict proj) {
int time_poll(time_t curr, time_t delta, time_t *restrict proj) {
bool tpass = curr >= *proj;
*proj += tpass * ((curr + delta) - *proj); // adds 0, or the difference to proj
return tpass;