mirror of
https://github.com/ep00ch/lwip-contrib-mac.git
synced 2024-06-11 09:29:40 +00:00
sys_now() should work for NO_SYS, too (where sys_init() is not called)
This commit is contained in:
parent
bdcf5c1ef9
commit
7b92f34341
|
@ -56,6 +56,11 @@ static LONGLONG sys_get_ms_longlong()
|
||||||
{
|
{
|
||||||
LONGLONG ret;
|
LONGLONG ret;
|
||||||
LARGE_INTEGER now;
|
LARGE_INTEGER now;
|
||||||
|
#if NO_SYS
|
||||||
|
if (freq.QuadPart == 0) {
|
||||||
|
sys_init_timing();
|
||||||
|
}
|
||||||
|
#endif /* NO_SYS */
|
||||||
QueryPerformanceCounter(&now);
|
QueryPerformanceCounter(&now);
|
||||||
ret = now.QuadPart-sys_start_time.QuadPart;
|
ret = now.QuadPart-sys_start_time.QuadPart;
|
||||||
return (u32_t)(((ret)*1000)/freq.QuadPart);
|
return (u32_t)(((ret)*1000)/freq.QuadPart);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user