summaryrefslogtreecommitdiff
path: root/nuttx/sched/sched
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-08-11 12:07:49 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-08-11 12:07:49 -0600
commit65a029c74614adbfaba41ef0192c7e03d993ff30 (patch)
tree37771321b1b48effc6761e1f95110f6037130414 /nuttx/sched/sched
parent2d465ad974a7c28a44cfff1fa3261cc4cd632307 (diff)
downloadnuttx-65a029c74614adbfaba41ef0192c7e03d993ff30.tar.gz
nuttx-65a029c74614adbfaba41ef0192c7e03d993ff30.tar.bz2
nuttx-65a029c74614adbfaba41ef0192c7e03d993ff30.zip
Fix a computation error in the fix for the last computational error
Diffstat (limited to 'nuttx/sched/sched')
-rw-r--r--nuttx/sched/sched/sched_timerexpiration.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/nuttx/sched/sched/sched_timerexpiration.c b/nuttx/sched/sched/sched_timerexpiration.c
index 0378775c1..95778ecbf 100644
--- a/nuttx/sched/sched/sched_timerexpiration.c
+++ b/nuttx/sched/sched/sched_timerexpiration.c
@@ -314,17 +314,17 @@ static void sched_timer_start(unsigned int ticks)
/* Convert ticks to a struct timespec that up_timer_start() can
* understand.
*
- * REVISIT: Calculations may not have acceptable ragne if uint64_t
+ * REVISIT: Calculations may not have an acceptable range if uint64_t
* is not supported(?)
*/
#ifdef CONFIG_HAVE_LONG_LONG
usecs = TICK2USEC((uint64_t)ticks);
#else
- usecs = TICK2USEC((uint64_t)ticks);
+ usecs = TICK2USEC(ticks);
#endif
secs = usecs / USEC_PER_SEC;
- nsecs = (usecs - (secs * USEC_PER_SEC)) * NSEC_PER_MSEC;
+ nsecs = (usecs - (secs * USEC_PER_SEC)) * NSEC_PER_USEC;
ts.tv_sec = (time_t)secs;
ts.tv_nsec = (long)nsecs;