aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2022-10-14 19:01:41 +0200
committerLuca Deri <deri@ntop.org>2022-10-14 19:01:41 +0200
commit3bb6bf628ddae939091945a3bed725017a0eee52 (patch)
tree997538bb67a2ec09f9f0e35bf4667679a8b11ded /src
parent1fecf69359a1a809e76ec1b37bee146c6ebd7752 (diff)
Removed gettimeofday as win files has located in windows/src/
Diffstat (limited to 'src')
-rw-r--r--src/lib/ndpi_classify.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/lib/ndpi_classify.c b/src/lib/ndpi_classify.c
index 91769edee..61a140d8c 100644
--- a/src/lib/ndpi_classify.c
+++ b/src/lib/ndpi_classify.c
@@ -682,29 +682,6 @@ ndpi_timeval_to_microseconds(pkt_timeval ts)
/* **************************************** */
-#if defined(WIN32) || defined(_MSC_VER)
-int gettimeofday(struct timeval* tp, struct timezone* tzp)
-{
- // Note: some broken versions only have 8 trailing zero's, the correct epoch has 9 trailing zero's
- // This magic number is the number of 100 nanosecond intervals since January 1, 1601 (UTC)
- // until 00:00:00 January 1, 1970
- static const uint64_t EPOCH = ((uint64_t)116444736000000000ULL);
-
- SYSTEMTIME system_time;
- FILETIME file_time;
- uint64_t time;
-
- GetSystemTime(&system_time);
- SystemTimeToFileTime(&system_time, &file_time);
- time = ((uint64_t)file_time.dwLowDateTime);
- time += ((uint64_t)file_time.dwHighDateTime) << 32;
-
- tp->tv_sec = (long)((time - EPOCH) / 10000000L);
- tp->tv_usec = (long)(system_time.wMilliseconds * 1000);
- return 0;
-}
-#endif
-
void
ndpi_log_timestamp(char *log_ts, uint32_t log_ts_len)
{