On Nov 15, 2011, at 9:15 AM, Ben Pfaff wrote:
> On Tue, Nov 15, 2011 at 01:48:50AM -0800, Justin Pettit wrote:
>> static int
>> ms_to_timer_remainder(int ms)
>> {
>> - return ms * 0x100 % 1000;
>> + return (ms * 0x100 % 1000) / 0x100;
>> }
>
> I think that this actually loses precision in the other direction.
> However, in a couple of quick calculations it looks like it is
> probably accurate enough.
Do you have a suggestion? It didn't seem optimal last night, but I wasn't
coming up with anything better at the time.
--Justin
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev