MInor refactoring
This commit is contained in:
@@ -44,12 +44,13 @@ bool TimeManager::ntp_sync_successful(void) const
|
||||
|
||||
bool TimeManager::ntp_sync_overdue(void)
|
||||
{
|
||||
bool retval = false;
|
||||
|
||||
if (!ntp_sync_successful())
|
||||
{
|
||||
return false;
|
||||
return retval;
|
||||
}
|
||||
|
||||
bool retval = false;
|
||||
// after the ntp sync update delay has been reached six times, the sync is considered overdue
|
||||
if (_now >= (_ntp_sync_timestamp_s + (time_t)(6 * (sntp_update_delay_MS_rfc_not_less_than_15000() / 1000))))
|
||||
{
|
||||
@@ -61,12 +62,13 @@ bool TimeManager::ntp_sync_overdue(void)
|
||||
|
||||
bool TimeManager::ntp_sync_timeout(void)
|
||||
{
|
||||
bool retval = false;
|
||||
|
||||
if (!ntp_sync_successful())
|
||||
{
|
||||
return false;
|
||||
return retval;
|
||||
}
|
||||
|
||||
bool retval = false;
|
||||
// after the maxmimum offline time has been reached, the sync is considered timed out
|
||||
if (_now >= (_ntp_sync_timestamp_s + (time_t)_ntp_max_offline_time_s))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user