(LIBRETRO) Make timer code more portable