mirror of
https://github.com/moparisthebest/curl
synced 2025-02-28 17:31:46 -05:00
tvnow: silence conversion warnings
MinGW-w64 defaults to targeting Windows 7 now, so GetTickCount64 is used and the milliseconds are represented as unsigned long long, leading to a compiler warning when implicitly converting them to long.
This commit is contained in:
parent
01ba09e25a
commit
46c89348b9
@ -47,7 +47,7 @@ struct timeval tvnow(void)
|
||||
DWORD milliseconds = GetTickCount();
|
||||
#endif
|
||||
now.tv_sec = (long)(milliseconds / 1000);
|
||||
now.tv_usec = (milliseconds % 1000) * 1000;
|
||||
now.tv_usec = (long)((milliseconds % 1000) * 1000);
|
||||
return now;
|
||||
}
|
||||
|
||||
|
@ -422,7 +422,7 @@ static struct timeval tvnow(void)
|
||||
DWORD milliseconds = GetTickCount();
|
||||
#endif
|
||||
now.tv_sec = (long)(milliseconds / 1000);
|
||||
now.tv_usec = (milliseconds % 1000) * 1000;
|
||||
now.tv_usec = (long)((milliseconds % 1000) * 1000);
|
||||
return now;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user