This commit is contained in:
2021-03-01 11:16:54 +01:00
parent 991f2724a6
commit 6e73dccd66
5 changed files with 11 additions and 4 deletions

View File

@ -14,12 +14,13 @@ static t_seconds seconds = { .seconds = 0, .missedUpdates = 0, .valid = false };
static t_configBlock *config;
static void networkSecondsHandler(void *handle) {
static bool tryAgain = false;
seconds.seconds += 1;
if (! seconds.valid) {
if (! seconds.valid && isNetworkAvailable()) {
coloredMsg(LOG_YELLOW, "nsh, initially querying time");
uint64_t tmpSeconds = networkSntpQuery();
if (tmpSeconds != 0) {