on master help sign in
addDelay doesn't need to exist
commit52e6c55084b21a8524d3750d9e521b9626e5b305 authorMichael James <michael@michaelbjames.com> dateWed 30 Jul 2014, 14:34 (12 years ago) parent3c528c6
2 files changed+2−8
runtime/Debugger.js+2−2 runtime/Init.js−6
runtime/Debugger.js+2−2
@@ -171,8 +171,6 @@ function debugModule(module, runtime) {
171171 }
172172
173173 function setContinue(position) {
174− var timerDelay = Date.now() - pauseTime;
175− runtime.timer.addDelay(timerDelay);
176174 programPaused = false;
177175 if (position > 0) {
178176 // If we're not unpausing at the head, then we need to dump the
@@ -188,6 +186,8 @@ function debugModule(module, runtime) {
188186 tracePath.clearTracesAfter(position);
189187 eventCounter = position;
190188 executeCallbacks(asyncCallbacks, false, lastEventTime);
189+ } else {
190+ runtime.timer.setDelay(0);
191191 }
192192 tracePath.startRecording();
193193 }
runtime/Init.js−6
@@ -44,18 +44,12 @@ function init(display, container, module, ports, moduleToReplace) {
4444 return Date.now() - inducedDelay;
4545 };
4646
47− var addDelay = function(d) {
48− inducedDelay += d;
49− return inducedDelay;
50− }
51−
5247 var setDelay = function(d) {
5348 inducedDelay = d;
5449 return inducedDelay;
5550 }
5651
5752 return { now : now
58− , addDelay : addDelay
5953 , setDelay : setDelay
6054 }
6155 }();