25 #if defined(WIN32) && !defined(MSDOS) 35 #if !defined(_WIN32_WINNT) || !defined(_WIN32_WINNT_VISTA) || \ 36 (_WIN32_WINNT < _WIN32_WINNT_VISTA) 37 DWORD milliseconds = GetTickCount();
41 ULONGLONG milliseconds = GetTickCount64();
42 now.
tv_sec = (time_t) (milliseconds / 1000);
43 now.
tv_usec = (
unsigned int) (milliseconds % 1000) * 1000;
49 #elif defined(HAVE_CLOCK_GETTIME_MONOTONIC) 62 struct timespec tsnow;
63 if(0 == clock_gettime(CLOCK_MONOTONIC, &tsnow)) {
64 cnow.
tv_sec = tsnow.tv_sec;
65 cnow.tv_usec = (
unsigned int)(tsnow.tv_nsec / 1000);
72 #ifdef HAVE_GETTIMEOFDAY 74 (void)gettimeofday(&
now, NULL);
80 cnow.tv_sec = time(NULL);
87 #elif defined(HAVE_GETTIMEOFDAY) 98 (void)gettimeofday(&
now, NULL);
130 #if SIZEOF_TIME_T < 8 134 if(diff >= (0x7fffffff/1000))
151 #if SIZEOF_TIME_T < 8 153 if(diff >= (0x7fffffff/1000000))
157 if(diff >= (0x7fffffffffffffffLL/1000000))
158 return 0x7fffffffffffffffLL;
struct curltime curlx_tvnow(void)
IMETHOD Vector diff(const Vector &p_w_a, const Vector &p_w_b, double dt=1)
time_t curlx_tvdiff(struct curltime newer, struct curltime older)
time_t Curl_tvdiff_us(struct curltime newer, struct curltime older)