From 940671560929bedf6f728e3fab4ba9693c275620 Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Thu, 14 Jun 2018 11:35:02 +0200 Subject: [PATCH] Minor fix on timestammp substraction --- lib/src/phy/common/timestamp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/phy/common/timestamp.c b/lib/src/phy/common/timestamp.c index 8c2fbe39f..ea8b6113d 100644 --- a/lib/src/phy/common/timestamp.c +++ b/lib/src/phy/common/timestamp.c @@ -66,7 +66,7 @@ int srslte_timestamp_sub(srslte_timestamp_t *t, time_t full_secs, double frac_se t->frac_secs -= frac_secs; t->full_secs -= full_secs; if(t->frac_secs < 0){ - t->frac_secs = 1-t->frac_secs; + t->frac_secs = t->frac_secs + 1; t->full_secs--; } if(t->full_secs < 0)