finish refactor

This commit is contained in:
2023-12-11 23:00:31 +02:00
committed by Illusion
parent e140863f66
commit 59f2a5934d
21 changed files with 1622 additions and 478 deletions
+5 -2
View File
@@ -1,3 +1,6 @@
#include <sys/time.h>
#include <stdlib.h>
#include "timer.h"
struct timeval start_time;
@@ -36,11 +39,11 @@ void timer_reset(Timer *timer) {
timer->state = TIMER_RUNNING;
}
float timer_remaining(Timer *timer) {
double timer_remaining(Timer *timer) {
return timer->duration - (get_time() - timer->start);
}
float timer_elapsed(Timer *timer) {
double timer_elapsed(Timer *timer) {
return get_time() - timer->start + timer->elapsed;
}