Potential fix to clock skew problem.

--HG--
extra : convert_revision : 51572523190a886fd0ff64817edc88e260c5fa9d
This commit is contained in:
Gabe Black 2006-10-27 06:51:28 -04:00
parent f985b752d3
commit d5974eff73

View file

@ -234,6 +234,9 @@ AtomicSimpleCPU::activateContext(int thread_num, int delay)
assert(!tickEvent.scheduled()); assert(!tickEvent.scheduled());
notIdleFraction++; notIdleFraction++;
//Make sure ticks are still on multiples of cycles
Tick nextTick = curTick + cycles(1) - 1;
nextTick -= (nextTick % (cycles(1)));
tickEvent.schedule(curTick + cycles(delay)); tickEvent.schedule(curTick + cycles(delay));
_status = Running; _status = Running;
} }