Fixes: Mixers were not calculated in simulator. CoGetOSTime() needed … (#4342)

* Fixes: Mixers were not calculated in simulator. CoGetOSTime() needed implementation.

* Cleanup
This commit is contained in:
Damjan Adamic
2017-01-30 15:33:22 +01:00
committed by Andre Bernet
parent bbe82db087
commit a45aafff33
2 changed files with 13 additions and 1 deletions
+12
View File
@@ -95,6 +95,18 @@ uint16_t getTmr2MHz()
#endif
}
U64 CoGetOSTime(void)
{
// one tick is 2ms
#if defined(_MSC_VER)
return GetTickCount()/2;
#else
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
return ((U64)ts.tv_sec * 1000 + ts.tv_nsec / 1000000) /2;
#endif
}
void simuInit()
{
#if defined(STM32)