removed pointless pointers in line and circle

This commit is contained in:
herbglitch 2025-03-18 23:58:47 -06:00
parent 56175ccb1b
commit bbffbe1cb3
5 changed files with 18 additions and 18 deletions

View file

@ -10,7 +10,7 @@
#include "arc/std/errno.h"
#include "arc/std/handler.h"
#include <stdlib.h>
#include <sys/time.h>
#include <time.h>
void ARC_EngineData_VectorDestroyStateFn(void *data){
ARC_State_Destroy((ARC_State *)data);
@ -68,16 +68,17 @@ void ARC_Engine_RunUncapped(ARC_EngineData *data){
}
//TODO: probably want to do this in a better way
struct timeval currentTime;
struct timeval lastTime;
struct timespec currentTime;
struct timespec lastTime;
gettimeofday(&currentTime, NULL);
clock_gettime(CLOCK_MONOTONIC, &currentTime);
lastTime = currentTime;
data->running = ARC_True;
while(data->running){
data->dt = (lastTime.tv_sec - currentTime.tv_sec) + (lastTime.tv_usec - currentTime.tv_usec);
clock_gettime(CLOCK_MONOTONIC, &currentTime);
data->dt = (currentTime.tv_sec + (currentTime.tv_nsec * 0.000000001)) - (lastTime.tv_sec + (lastTime.tv_nsec * 0.000000001));
lastTime = currentTime;
data->running = ARC_Input_Update(data->input);