Author SHA1 Message Date
wiesendsi102436 4ce3a6aac0 fix: apply build FLAGS correctly
A typo in the dependency variable program_obj_files caused make to fall back to implicit/default rules. FLAGS was ignored because the default behavior is to use CFLAGS.
2025-11-30 10:55:37 +01:00
2 changed files with 5 additions and 12 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ program_obj_files = stack.o bintree.o numbers.o timer.o highscore.o
doble : main.o $(program_obj_files)
$(CC) $(FLAGS) $^ -o doble
$(program_obj_filesobj_files): %.o: %.c
$(program_obj_files): %.o: %.c
$(CC) -c $(FLAGS) $^ -o $@
# --------------------------
+2 -9
View File
@@ -1,12 +1,6 @@
#include "timer.h"
#ifdef __linux__
// Defines strict posix compliance for CLOCK_MONOTONIC
#define _POSIX_C_SOURCE 199309L
#include <time.h>
#endif
#if __APPLE__ || __linux__
#if __APPLE__
#include <sys/time.h>
static struct timespec start = {0, 0};
@@ -27,8 +21,7 @@ double stopTimer()
double measuredSeconds = (double)delta_us / 1000000.;
if (start.tv_nsec > 0)
{
if(start.tv_nsec > 0) {
start.tv_nsec = 0;
start.tv_sec = 0;
}