1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-20 23:05:12 +03:00

RTC time initialization in simulator

This commit is contained in:
Damjan Adamic 2014-06-18 22:22:15 +02:00
parent c82068115f
commit 1e917da05e

View file

@ -39,6 +39,9 @@
#include <fcntl.h> #include <fcntl.h>
#include <stdarg.h> #include <stdarg.h>
#include <sys/stat.h> #include <sys/stat.h>
#if defined(RTCLOCK)
#include <time.h>
#endif
#if defined WIN32 || !defined __GNUC__ #if defined WIN32 || !defined __GNUC__
#include <direct.h> #include <direct.h>
@ -352,6 +355,9 @@ void StartMainThread(bool tests)
#endif #endif
g_tmr10ms = 0; g_tmr10ms = 0;
#if defined(RTCLOCK)
g_rtcTime = time(0);
#endif
main_thread_running = (tests ? 1 : 2); main_thread_running = (tests ? 1 : 2);
pthread_create(&main_thread_pid, NULL, &main_thread, NULL); pthread_create(&main_thread_pid, NULL, &main_thread, NULL);