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:
parent
c82068115f
commit
1e917da05e
1 changed files with 7 additions and 1 deletions
|
@ -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);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue