PaulStoffregen/Time

timeStatus never returns timeNeedsSync

Horst-Borscht opened this issue · 0 comments

Hi,

I can not manage to get a return value of timeNeedsSync from the timeStatus() routine (only timeNotSet or timeSet).

I think, the line where the Status is set
Status = (Status == timeNotSet) ? timeNotSet : timeNeedsSync;

has to be moved to this position:
...
nextSyncTime = sysTime + syncInterval;
}
}
Status = (Status == timeNotSet) ? timeNotSet : timeNeedsSync;
}
return (time_t)sysTime;

With this change, everythink works well and as expected for me.

Greetings
Horst