mirror of
https://github.com/alexhopeoconnor/firmware.git
synced 2026-10-15 07:51:19 +10:00
Add native Windows build of meshtasticd (#11031)
This commit is contained in:
@@ -428,10 +428,14 @@ void setup()
|
||||
#if ARCH_PORTDUINO
|
||||
RTCQuality ourQuality = RTCQualityDevice;
|
||||
|
||||
#ifdef __linux__
|
||||
// timedatectl is systemd-only, so macOS, Windows and WASM stay at
|
||||
// RTCQualityDevice rather than claim NTP quality we have not verified.
|
||||
std::string timeCommandResult = exec("timedatectl status | grep synchronized | grep yes -c");
|
||||
if (timeCommandResult[0] == '1') {
|
||||
ourQuality = RTCQualityNTP;
|
||||
}
|
||||
#endif
|
||||
|
||||
struct timeval tv;
|
||||
tv.tv_sec = time(NULL);
|
||||
|
||||
Reference in New Issue
Block a user