Przeglądaj źródła

Fix compilation warning on MSVC

Paul-Louis Ageneau 1 rok temu
rodzic
commit
5515f71539
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      examples/streamer/helpers.cpp

+ 1 - 1
examples/streamer/helpers.cpp

@@ -38,7 +38,7 @@ int gettimeofday(struct timeval *tv, struct timezone *tz) {
 		x.LowPart = filetime.dwLowDateTime;
 		x.LowPart = filetime.dwLowDateTime;
 		x.HighPart = filetime.dwHighDateTime;
 		x.HighPart = filetime.dwHighDateTime;
 		usec = x.QuadPart / 10 - epoch_offset_us;
 		usec = x.QuadPart / 10 - epoch_offset_us;
-		tv->tv_sec = time_t(usec / 1000000ULL);
+		tv->tv_sec = long(usec / 1000000ULL);
 		tv->tv_usec = long(usec % 1000000ULL);
 		tv->tv_usec = long(usec % 1000000ULL);
 	}
 	}
 	if (tz) {
 	if (tz) {