Skip to content

Commit

Permalink
Provide an initial time value
Browse files Browse the repository at this point in the history
  • Loading branch information
esev committed Dec 26, 2024
1 parent eed5cfd commit ae84b6d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions test/TestUtil.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
#include "TestUtil.h"
#include "SerialConsole.h"
#include "concurrency/OSThread.h"
#include "gps/RTC.h"

#include "TestUtil.h"

void initializeTestEnvironment()
{
concurrency::hasBeenSetup = true;
concurrency::OSThread::setup();
consoleInit();
#if ARCH_PORTDUINO
struct timeval tv;
tv.tv_sec = time(NULL);
tv.tv_usec = 0;
perhapsSetRTC(RTCQualityNTP, &tv);
#endif
concurrency::OSThread::setup();
}

0 comments on commit ae84b6d

Please sign in to comment.