Il 14/09/2014 15:06, Laszlo Ersek ha scritto:
> + } else {
> + Accumulator -= gMetronome->TickPeriod;
> + if (Counter == MAX_UINT64) {
> + CoreInternalWaitForTick (Counter);
> + CoreInternalWaitForTick (1);
> + } else {
> + CoreInternalWaitForTick (Counter + 1);
> + }
Counter is the result of a division, so it is at most
0x1999999999999999ULL. You do not need the "if", I think.
Paolo
> + }
> + }
>
> - if (Remainder != 0) {
> - //
> - // If Remainder was not zero, then normally, Counter would be rounded
> - // up by 1 tick. In this case, since a loop for 10 counts was used
> - // to emulate the multiply by 10 operation, Counter needs to be rounded
> - // up by 10 counts.
> - //
> - CoreInternalWaitForTick (10);
> + //
> + // Flush any remaining fractional ticks.
> + //
> + if (Accumulator > 0) {
> + CoreInternalWaitForTick (1);
> }
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel