Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

CPU: Actually keep track of the "_run" timer.

  • Loading branch information...
commit e778427d1a7c2615c8265f1b2b7159c947e2e166 1 parent 643f62e
@nelhage authored
Showing with 1 addition and 3 deletions.
  1. +1 −3 CPU.js
View
4 CPU.js
@@ -274,8 +274,6 @@ var CPU = {
},
_run: function() {
- if (!CPU.run_timer)
- return;
var i = 0;
while (i++ < 1000 && !CPU.halt)
CPU.step();
@@ -285,7 +283,7 @@ var CPU = {
if (CPU.config.halt)
CPU.config.halt();
} else {
- setTimeout(CPU._run, 0);
+ CPU.run_timer = setTimeout(CPU._run, 0);
}
},
Please sign in to comment.
Something went wrong with that request. Please try again.