Skip to content

Commit

Permalink
Remove duplicate gettimeofday
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishcoleman committed May 9, 2024
1 parent 3dfdc74 commit b9e1f1e
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions src/n2n.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,30 +375,6 @@ int memxor (uint8_t *destination, const uint8_t *source, size_t len) {

/* *********************************************** */

#ifdef _WIN32
int gettimeofday (struct timeval *tp, void *tzp) {

time_t clock;
struct tm tm;
SYSTEMTIME wtm;

GetLocalTime(&wtm);
tm.tm_year = wtm.wYear - 1900;
tm.tm_mon = wtm.wMonth - 1;
tm.tm_mday = wtm.wDay;
tm.tm_hour = wtm.wHour;
tm.tm_min = wtm.wMinute;
tm.tm_sec = wtm.wSecond;
tm.tm_isdst = -1;
clock = mktime(&tm);
tp->tv_sec = clock;
tp->tv_usec = wtm.wMilliseconds * 1000;

return 0;
}
#endif


// stores the previously issued time stamp
static uint64_t previously_issued_time_stamp = 0;

Expand Down

0 comments on commit b9e1f1e

Please sign in to comment.