refactor: pass structs as pointers except for background things

This commit is contained in:
2025-11-08 19:24:14 +01:00
parent 92f010ca70
commit 3b7a550b6a
23 changed files with 418 additions and 450 deletions
+4 -8
View File
@@ -4,15 +4,11 @@
#include "timer.h"
Timer timer_init(const unsigned int target) {
Timer output;
void timer_init(Timer *timer, const unsigned int target) {
timer->counter = 0;
timer->target = target;
output.counter = 0;
output.target = target;
gettimeofday(&output.start, NULL);
return output;
gettimeofday(&timer->start, NULL);
}
bool timer_inc(Timer *timer) {