On Tue, 5 Jul 2011 18:41:13 +0200 Fabien Chouteau <chout...@adacore.com> wrote:
> On 05/07/2011 18:02, Scott Wood wrote: > > On Mon, 4 Jul 2011 17:06:54 +0200 > > Fabien Chouteau <chout...@adacore.com> wrote: > >> Do you mean "lapse = period - ((tb - (1 << target_bit)) & (period - 1));" ? > > > > Yes. > > > > Or more simply: > > > > lapse = period - ((tb - period) & (period - 1)); > > > > Are you sure? Note that period != (1 << target_bit). Ah, right -- misread that. -Scott