clarify code

This commit is contained in:
2025-09-18 13:23:17 +02:00
parent ee8953fea0
commit abc5ecfa34
21 changed files with 119 additions and 117 deletions
+3 -3
View File
@@ -2,7 +2,7 @@
#include "types.h"
Timer create_timer(const unsigned int target) {
Timer timer_init(const unsigned int target) {
Timer output = {
.counter = 0,
.target = target,
@@ -13,12 +13,12 @@ Timer create_timer(const unsigned int target) {
return output;
}
bool inc_timer(Timer *timer) {
bool timer_inc(Timer *timer) {
timer->counter += 1;
return timer->counter >= timer->target;
}
double reset_and_count(Timer *timer) {
double timer_reset(Timer *timer) {
struct timeval stop;
double secs, per_secs;
gettimeofday(&stop, NULL);