Fix an error in clock_timespec_subtract

This commit is contained in:
Lok
2015-11-03 07:28:46 -06:00
committed by Gregory Nutt
parent 6cfad17602
commit da8950fe5b
3 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -11058,4 +11058,5 @@
* drivers/discrete/userled_lower.c: Add a generic lower-half user LED
driver that may be used by any board that supports the standard
board user LED interfaces (2015-11-01).
* sched/clock: Fix error in clock_timespec_subtract(). Found by Lok
(2015-11-03).
+1 -1
Submodule arch updated: 7526685e83...b763efbe64
+1 -1
View File
@@ -83,7 +83,7 @@ void clock_timespec_subtract(FAR const struct timespec *ts1,
}
else
{
sec = ts1->tv_sec + ts2->tv_sec;
sec = ts1->tv_sec - ts2->tv_sec;
if (ts1->tv_nsec < ts2->tv_nsec)
{
nsec = (ts1->tv_nsec + NSEC_PER_SEC) - ts2->tv_nsec;