* jamal <1096901984.1073.9.camel@xxxxxxxxxxxxxxxx> 2004-10-04 10:59
> is that bad to let those have a slight different innacurate value?
I don't see this as a problem, I think the timers will be more
> BTW wasnt there a jiffies2ms converter somewhere that we could use?
> I thought i saw something posted of that nature recently.
but we don't have half a jiffie ;) The only way to make it accurate in
the case of 122 and 50 would be to set timer_expires based on a flip-flop
adding HZ/4 and (HZ/4)+1 repeaditly and this only works if HZ%2==0.
I would be fine using PSCHED_ because the user can decide accuracy
over performance and vice versa. It would make the code dependant on
> There should really be no difference between the two;-> you realize /4
> is merely <<2 ?
Oh yes there is: HZ=50, idx=2
ans = 12.500
ans = 1100
ans = 48
ans = 110010
ans = 200
ans = 50
It avoids carrying on the inaccuracy, of course this only works because
(2*HZ)%4==0 is true for all existing HZ values. Or do I misundstand the
compiler and it's all in floating points?