diff --git a/radio/src/targets/simu/simpgmspace.cpp b/radio/src/targets/simu/simpgmspace.cpp index 9a7114179..e3d78477c 100644 --- a/radio/src/targets/simu/simpgmspace.cpp +++ b/radio/src/targets/simu/simpgmspace.cpp @@ -17,17 +17,17 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ - #include "opentx.h" #include #include #include #include -#include -#if defined WIN32 || !defined __GNUC__ +#if defined(_MSC_VER) #include #define mkdir(s, f) _mkdir(s) +#else + #include #endif #if defined(SIMU_DISKIO) @@ -96,16 +96,24 @@ void toplcdOff() uint16_t getTmr16KHz() { +#if defined(_MSC_VER) + return get_tmr10ms() * 16; +#else struct timeval tv; gettimeofday(&tv, NULL); return tv.tv_usec * 2 / 125; +#endif } uint16_t getTmr2MHz() { +#if defined(_MSC_VER) + return get_tmr10ms() * 125; +#else struct timeval tv; gettimeofday(&tv, NULL); return tv.tv_usec * 2; +#endif } void simuInit()