Skip to content

Commit

Permalink
Fix Windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
nibanks authored Dec 30, 2024
1 parent 5bc8fcc commit 9836bb2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/quicreach.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,11 @@ void DumpResultsToFile() {
char UtcDateTime[256];
time_t Time = time(nullptr);
struct tm Tm;
#ifdef _WIN32
gmtime_s(&Tm, &Time);
#else
gmtime_r(&Time, &Tm);
#endif
strftime(UtcDateTime, sizeof(UtcDateTime), "%Y.%m.%d-%H:%M:%S", &Tm);
fprintf(File, "%s,%u,%u,%u,%u,%u,%u,%u,%u\n", UtcDateTime,
Results.TotalCount.load(), Results.ReachableCount.load(), Results.TooMuchCount.load(), Results.MultiRttCount.load(),
Expand Down

0 comments on commit 9836bb2

Please sign in to comment.