on master help sign in
addDelay doesn't need to exist
52e6c55Michael James
runtime/Debugger.js+2−2
@@ -171,8 +171,6 @@ function debugModule(module, runtime) {
171 }
171 }
172
172
173 function setContinue(position) {
173 function setContinue(position) {
174− var timerDelay = Date.now() - pauseTime;
175− runtime.timer.addDelay(timerDelay);
176 programPaused = false;
174 programPaused = false;
177 if (position > 0) {
175 if (position > 0) {
178 // If we're not unpausing at the head, then we need to dump the
176 // If we're not unpausing at the head, then we need to dump the
@@ -188,6 +186,8 @@ function debugModule(module, runtime) {
188 tracePath.clearTracesAfter(position);
186 tracePath.clearTracesAfter(position);
189 eventCounter = position;
187 eventCounter = position;
190 executeCallbacks(asyncCallbacks, false, lastEventTime);
188 executeCallbacks(asyncCallbacks, false, lastEventTime);
189+ } else {
190+ runtime.timer.setDelay(0);
191 }
191 }
192 tracePath.startRecording();
192 tracePath.startRecording();
193 }
193 }
runtime/Init.js−6
@@ -44,18 +44,12 @@ function init(display, container, module, ports, moduleToReplace) {
44 return Date.now() - inducedDelay;
44 return Date.now() - inducedDelay;
45 };
45 };
46
46
47− var addDelay = function(d) {
48− inducedDelay += d;
49− return inducedDelay;
50− }
51−
52 var setDelay = function(d) {
47 var setDelay = function(d) {
53 inducedDelay = d;
48 inducedDelay = d;
54 return inducedDelay;
49 return inducedDelay;
55 }
50 }
56
51
57 return { now : now
52 return { now : now
58− , addDelay : addDelay
59 , setDelay : setDelay
53 , setDelay : setDelay
60 }
54 }
61 }();
55 }();