mirror of
https://github.com/curl/curl.git
synced 2026-07-24 18:27:20 +03:00
types: remove curl_int64_t/curl_uint64_t
These types and the definitions surrounding them are no longer needed. Closes #19706
This commit is contained in:
parent
0b09ad8ecb
commit
94ce87c391
4 changed files with 97 additions and 112 deletions
|
|
@ -31,16 +31,16 @@
|
|||
struct timeval tvrealnow(void)
|
||||
{
|
||||
/* UNIX EPOCH (1970-01-01) in FILETIME (1601-01-01) as 64-bit value */
|
||||
static const curl_uint64_t EPOCH = (curl_uint64_t)116444736000000000ULL;
|
||||
static const uint64_t EPOCH = UINT64_C(116444736000000000);
|
||||
SYSTEMTIME systime;
|
||||
FILETIME ftime; /* 100ns since 1601-01-01, as double 32-bit value */
|
||||
curl_uint64_t time; /* 100ns since 1601-01-01, as 64-bit value */
|
||||
uint64_t time; /* 100ns since 1601-01-01, as 64-bit value */
|
||||
struct timeval now;
|
||||
|
||||
GetSystemTime(&systime);
|
||||
SystemTimeToFileTime(&systime, &ftime);
|
||||
time = ((curl_uint64_t)ftime.dwLowDateTime);
|
||||
time += ((curl_uint64_t)ftime.dwHighDateTime) << 32;
|
||||
time = ((uint64_t)ftime.dwLowDateTime);
|
||||
time += ((uint64_t)ftime.dwHighDateTime) << 32;
|
||||
|
||||
now.tv_sec = (long)((time - EPOCH) / 10000000L); /* unit is 100ns */
|
||||
now.tv_usec = (long)(systime.wMilliseconds * 1000);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue