mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 09:34:19 +00:00
Merge pull request #105 from cinaera/pr_detail
Fix C89-compatibility compiler error
This commit is contained in:
commit
727baa0604
|
@ -662,12 +662,14 @@ int64 time_get()
|
||||||
last = (int64)val.tv_sec*(int64)1000000+(int64)val.tv_usec;
|
last = (int64)val.tv_sec*(int64)1000000+(int64)val.tv_usec;
|
||||||
return last;
|
return last;
|
||||||
#elif defined(CONF_FAMILY_WINDOWS)
|
#elif defined(CONF_FAMILY_WINDOWS)
|
||||||
int64 t;
|
{
|
||||||
QueryPerformanceCounter((PLARGE_INTEGER)&t);
|
int64 t;
|
||||||
if(t<last) /* for some reason, QPC can return values in the past */
|
QueryPerformanceCounter((PLARGE_INTEGER)&t);
|
||||||
return last;
|
if(t<last) /* for some reason, QPC can return values in the past */
|
||||||
last = t;
|
return last;
|
||||||
return t;
|
last = t;
|
||||||
|
return t;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
#error not implemented
|
#error not implemented
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue