libretro / dosbox-libretro

Port of DOSBox (upstream) to the libretro API.
GNU General Public License v2.0
61 stars 40 forks source link

Fix android ndk removing ftime #36

Closed meepingsnesroms closed 7 years ago

meepingsnesroms commented 7 years ago

Also now retrieves valid milliseconds without ftime.

Alcaro commented 7 years ago

WIN32

I usually use _WIN32. Is that one equivalent on all platforms, including MinGW, Cygwin and Xbox?

+#ifndef WIN32

  • struct timeval tv;
  • gettimeofday(&tv, NULL);

That'll work fine on Windows, as well as anything Unix-like.

Which excludes, for example, PS3 and GameCube, which I doubt we want to break. Better use a #ifdef for something that confirms its presense, unix maybe?

meepingsnesroms commented 7 years ago

I fixed that now it will use ftime if it can,then linux and as a last resort return 0.