forked from Archive/PX4-Autopilot
Fix clock_time2ticks to round up, not down. This makes sem_timedwait for at least the necessary period.
This commit is contained in:
parent
3cea0959b7
commit
81115166a7
|
@ -97,6 +97,6 @@ int clock_time2ticks(FAR const struct timespec *reltime, FAR int *ticks)
|
||||||
|
|
||||||
/* Convert microseconds to clock ticks */
|
/* Convert microseconds to clock ticks */
|
||||||
|
|
||||||
*ticks = relusec / USEC_PER_TICK;
|
*ticks = (relusec + USEC_PER_TICK - 1) / USEC_PER_TICK;
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue