summaryrefslogtreecommitdiff
path: root/windows_port.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-05-09 16:30:24 +0000
committerYang Tse <yangsita@gmail.com>2008-05-09 16:30:24 +0000
commit0848b4fdaa130054c981194afa2ff0cd136d2590 (patch)
tree7c155964a353e2a872427b3aa1402e3f9be02f7a /windows_port.c
parentfd5fdecf303826473ccb50a8762a331473b3c481 (diff)
downloadc-ares-0848b4fdaa130054c981194afa2ff0cd136d2590.tar.gz
c-ares-0848b4fdaa130054c981194afa2ff0cd136d2590.tar.bz2
c-ares-0848b4fdaa130054c981194afa2ff0cd136d2590.zip
Use monotonic time source if available.
Diffstat (limited to 'windows_port.c')
-rw-r--r--windows_port.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/windows_port.c b/windows_port.c
index 02bb4cb..7ea6579 100644
--- a/windows_port.c
+++ b/windows_port.c
@@ -55,37 +55,6 @@ ares_strcasecmp(const char *a, const char *b)
}
#endif
-/*
- * Number of micro-seconds between the beginning of the Windows epoch
- * (Jan. 1, 1601) and the Unix epoch (Jan. 1, 1970).
- */
-#if defined(_MSC_VER) || defined(__WATCOMC__)
-#define EPOCH_FILETIME 11644473600000000Ui64
-#else
-#define EPOCH_FILETIME 11644473600000000ULL
-#endif
-
-int
-ares_gettimeofday(struct timeval *tv, struct timezone *tz)
-{
- FILETIME ft;
- LARGE_INTEGER li;
- __int64 t;
-
- if (tv)
- {
- GetSystemTimeAsFileTime(&ft);
- li.LowPart = ft.dwLowDateTime;
- li.HighPart = ft.dwHighDateTime;
- t = li.QuadPart / 10; /* In micro-second intervals */
- t -= EPOCH_FILETIME; /* Offset to the Epoch time */
- tv->tv_sec = (long)(t / 1000000);
- tv->tv_usec = (long)(t % 1000000);
- }
- (void) tz;
- return 0;
-}
-
int
ares_writev (ares_socket_t s, const struct iovec *vector, size_t count)
{