Remove a slightly alarming and incorrect warning. Old information is dealt with elsewhere.

This commit is contained in:
Mike Brady
2022-05-14 18:59:06 +10:00
parent 4fa06bed6b
commit 903ba42ec5
-10
View File
@@ -71,7 +71,6 @@ int get_nqptp_data(struct shm_structure *nqptp_data) {
return response;
}
int age_signalled = 0;
int ptp_get_clock_info(uint64_t *actual_clock_id, uint64_t *time_of_sample, uint64_t *raw_offset,
uint64_t *mastership_start_time) {
int response = clock_ok;
@@ -93,15 +92,6 @@ int ptp_get_clock_info(uint64_t *actual_clock_id, uint64_t *time_of_sample, uint
*actual_clock_id = nqptp_data.master_clock_id;
if (time_of_sample != NULL)
*time_of_sample = nqptp_data.local_time;
int64_t age_of_sample = get_absolute_time_in_ns() - nqptp_data.local_time;
int64_t too_old_time = 1000000000;
too_old_time = too_old_time * 10; // seconds
if ((age_of_sample >= too_old_time) && (age_signalled == 0)) {
warn("PTP sample time is old -- is NQPTP running?");
age_signalled = 1;
}
if (age_of_sample < too_old_time)
age_signalled = 0;
if (raw_offset != NULL)
*raw_offset = nqptp_data.local_to_master_time_offset;
if (mastership_start_time != NULL)