diff --git a/ChangeLog b/ChangeLog index 246d913890..f02f9dc31a 100755 --- a/ChangeLog +++ b/ChangeLog @@ -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). diff --git a/arch b/arch index 7526685e83..b763efbe64 160000 --- a/arch +++ b/arch @@ -1 +1 @@ -Subproject commit 7526685e83229a7249d739b15bb1844eee9fce8e +Subproject commit b763efbe64b84ff1cefdd428c7a3d7b7b69f1c9b diff --git a/sched/clock/clock_timespec_subtract.c b/sched/clock/clock_timespec_subtract.c index c47ea35562..c02dc35538 100644 --- a/sched/clock/clock_timespec_subtract.c +++ b/sched/clock/clock_timespec_subtract.c @@ -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;