Fix clock_time2ticks to round up, not down. This makes sem_timedwait for at least the necessary period.

This commit is contained in:
px4dev 2013-01-09 21:40:42 -08:00
parent 3cea0959b7
commit 81115166a7
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}