on master help sign in
logical improvement: always add a pause delay
commit05fe7e53a40ef06d54be542feab18551c7014a99 authorMichael James <michael@michaelbjames.com> dateThu 31 Jul 2014, 15:08 (12 years ago) parent1cb66bf
1 file changed+4
runtime/Debugger.js+4
runtime/Debugger.js+4
@@ -43,6 +43,7 @@ function debugModule(module, runtime) {
4343 var asyncCallbacks = [];
4444 var snapshots = [];
4545 var watchTracker = Elm.Native.Debug.make(runtime).watchTracker;
46+ var pauseTime = 0;
4647 var eventsUntilSnapshot = EVENTS_PER_SAVE;
4748
4849 // runtime is the prototype of wrappedRuntime
@@ -166,9 +167,12 @@ function debugModule(module, runtime) {
166167 programPaused = true;
167168 clearAsyncCallbacks();
168169 tracePath.stopRecording();
170+ pauseTime = Date.now();
169171 }
170172
171173 function setContinue(position) {
174+ var pauseDelay = Date.now() - pauseTime;
175+ runtime.timer.addDelay(pauseDelay);
172176 programPaused = false;
173177 if (position > 0) {
174178 // If we're not unpausing at the head, then we need to dump the