diff options
Diffstat (limited to 'nuttx/sched')
-rw-r--r-- | nuttx/sched/clock_time2ticks.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nuttx/sched/clock_time2ticks.c b/nuttx/sched/clock_time2ticks.c index 383264d51..9265872bb 100644 --- a/nuttx/sched/clock_time2ticks.c +++ b/nuttx/sched/clock_time2ticks.c @@ -97,6 +97,6 @@ int clock_time2ticks(FAR const struct timespec *reltime, FAR int *ticks) /* Convert microseconds to clock ticks */ - *ticks = relusec / USEC_PER_TICK; + *ticks = (relusec + USEC_PER_TICK - 1) / USEC_PER_TICK; return OK; } |