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-13 19:05:00 -08:00
parent 3cea0959b7
commit 81115166a7
+1 -1
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;
}