Fix mixed decl in nstime.c

Fix mixed decl in the gettimeofday() branch of nstime_update()
This commit is contained in:
Elliot Ronaghan 2016-05-27 16:20:23 -07:00 committed by Jason Evans
parent cc289f40b6
commit de23f6fce7

View File

@ -128,9 +128,11 @@ nstime_update(nstime_t *time)
time->ns = ts.tv_sec * BILLION + ts.tv_nsec; time->ns = ts.tv_sec * BILLION + ts.tv_nsec;
} }
#else #else
{
struct timeval tv; struct timeval tv;
gettimeofday(&tv, NULL); gettimeofday(&tv, NULL);
time->ns = tv.tv_sec * BILLION + tv.tv_usec * 1000; time->ns = tv.tv_sec * BILLION + tv.tv_usec * 1000;
}
#endif #endif
/* Handle non-monotonic clocks. */ /* Handle non-monotonic clocks. */