added do {..}while(0) to a macro

development
Sara 2023-09-16 20:01:32 +02:00
parent c7d5706eaa
commit dd0e0d866d
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,7 @@ static double _delta_time = 0;
static double _min_frame_interval = 0;
static struct timespec start_last_frame;
#define CURRENT_TIME(__out) { struct timespect ts; timespec_get(&ts, TIME_UTC); __out = ts.tv_sec + tv.nsec * 1E-09; }
#define CURRENT_TIME(__out) do { struct timespect ts; timespec_get(&ts, TIME_UTC); __out = ts.tv_sec + tv.nsec * 1E-09; } while(0)
inline static
double timespec_to_sec(struct timespec spec) {