added do {..}while(0) to a macro
parent
c7d5706eaa
commit
dd0e0d866d
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue