Commit 46c89348 authored by Marcel Raad's avatar Marcel Raad
Browse files

tvnow: silence conversion warnings

MinGW-w64 defaults to targeting Windows 7 now, so GetTickCount64 is
used and the milliseconds are represented as unsigned long long,
leading to a compiler warning when implicitly converting them to long.
parent 01ba09e2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ struct timeval tvnow(void)
  DWORD milliseconds = GetTickCount();
#endif
  now.tv_sec = (long)(milliseconds / 1000);
  now.tv_usec = (milliseconds % 1000) * 1000;
  now.tv_usec = (long)((milliseconds % 1000) * 1000);
  return now;
}

+1 −1
Original line number Diff line number Diff line
@@ -422,7 +422,7 @@ static struct timeval tvnow(void)
  DWORD milliseconds = GetTickCount();
#endif
  now.tv_sec = (long)(milliseconds / 1000);
  now.tv_usec = (milliseconds % 1000) * 1000;
  now.tv_usec = (long)((milliseconds % 1000) * 1000);
  return now;
}