X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=lib%2Ftimeval.c;h=769eb3c49c561c767eeafc92a2149b6323e2f6c9;hb=df4392d06fac8fead7a2cbde19684f54c580af68;hp=2fd72014481451916e7337ec0cef22e5939adb56;hpb=867eb33477c07331e7b58302119308d02a02ee01;p=platform%2Fupstream%2Fcurl.git diff --git a/lib/timeval.c b/lib/timeval.c index 2fd7201..769eb3c 100644 --- a/lib/timeval.c +++ b/lib/timeval.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2008, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -32,9 +32,17 @@ struct timeval curlx_tvnow(void) ** increases monotonically and wraps once 49.7 days have elapsed. */ struct timeval now; +#if !defined(_WIN32_WINNT) || !defined(_WIN32_WINNT_VISTA) || \ + (_WIN32_WINNT < _WIN32_WINNT_VISTA) DWORD milliseconds = GetTickCount(); now.tv_sec = milliseconds / 1000; now.tv_usec = (milliseconds % 1000) * 1000; +#else + ULONGLONG milliseconds = GetTickCount64(); + now.tv_sec = (long) (milliseconds / 1000); + now.tv_usec = (long) (milliseconds % 1000) * 1000; +#endif + return now; }