on master help sign in
fix for the clock but it broke mario
commitab1ba45b97af06b80a4a6fb0311693191998ed35 authorMichael James <michael@michaelbjames.com> dateWed 30 Jul 2014, 10:28 (12 years ago) parent0e23d1a
2 files changed+10
runtime/Debugger.js+4 runtime/Init.js+6
runtime/Debugger.js+4
@@ -180,6 +180,10 @@ function debugModule(module, runtime) {
180180 var lastSnapshotPosition = Math.floor(position / EVENTS_PER_SAVE);
181181 eventsUntilSnapshot = EVENTS_PER_SAVE - (position % EVENTS_PER_SAVE);
182182 snapshots = snapshots.slice(0, lastSnapshotPosition + 1);
183+
184+ var lastEventTime = recordedEvents[position-1].timestep;
185+ runtime.timer.setDelay(Date.now() - lastEventTime);
186+
183187 recordedEvents = recordedEvents.slice(0, position);
184188 tracePath.clearTracesAfter(position);
185189 eventCounter = position;
runtime/Init.js+6
@@ -49,8 +49,14 @@ function init(display, container, module, ports, moduleToReplace) {
4949 return inducedDelay;
5050 }
5151
52+ var setDelay = function(d) {
53+ inducedDelay = d;
54+ return inducedDelay;
55+ }
56+
5257 return { now : now
5358 , addDelay : addDelay
59+ , setDelay : setDelay
5460 }
5561 }();
5662