removed pointless pointers in line and circle
This commit is contained in:
parent
56175ccb1b
commit
bbffbe1cb3
5 changed files with 18 additions and 18 deletions
|
|
@ -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(¤tTime, NULL);
|
||||
clock_gettime(CLOCK_MONOTONIC, ¤tTime);
|
||||
|
||||
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, ¤tTime);
|
||||
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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue