The monotonic clock can never go backwards.  If you take T1 and later T2
from that clock, then (T2 > T1) is always true.

This patch removes the useless test.

[ This test evolved over the years. Originally the time stamp in question
  came from a PHC. ]

Signed-off-by: Richard Cochran <richardcoch...@gmail.com>
---
 pmc_agent.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/pmc_agent.c b/pmc_agent.c
index f30f174..df3a562 100644
--- a/pmc_agent.c
+++ b/pmc_agent.c
@@ -351,8 +351,7 @@ int update_pmc_node(struct pmc_agent *node)
        }
        ts = tp.tv_sec * NS_PER_SEC + tp.tv_nsec;
 
-       if (!(ts > node->pmc_last_update &&
-             ts - node->pmc_last_update < PMC_UPDATE_INTERVAL)) {
+       if (!(ts - node->pmc_last_update < PMC_UPDATE_INTERVAL)) {
                if (node->stay_subscribed) {
                        renew_subscription(node, 0);
                }
-- 
2.20.1



_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to