[Bug 1894] missing a tick in _Timespec_To_ticks

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Mon Aug 22 16:12:33 UTC 2011


https://www.rtems.org/bugzilla/show_bug.cgi?id=1894

--- Comment #18 from Gedare <giddyup44 at yahoo.com> 2011-08-22 11:12:32 CDT ---
(In reply to comment #17)
> If you want to divide and round up you should use this:
> 
>     (a + b - 1) / b
> 
> This avoids one division and the branches.

I thought there was something like this but I couldn't remember. Nice work
pointing it out, the if and mod were bugging me.

-- 
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the bugs mailing list