Switched interrupt management to a new set of Trigger functions and static Trigger objects, eliminating the old InterruptQueue of constantly created/destroyed InterruptEvents

This commit is contained in:
Jeff Parsons 2016-10-13 10:20:11 -07:00 committed by Jeff Parsons
commit 686396d726
6 changed files with 255 additions and 254 deletions

View file

@ -898,6 +898,11 @@ CPUPDP11.prototype.calcRemainingTime = function()
*
* Why not use JavaScript's setTimeout() instead? Good question. For a good answer, see setTimer() below.
*
* TODO: Consider making the addTimer() and setTimer() interfaces more like the addTrigger() and setTrigger()
* interfaces (which return the underlying object instead of an array index) and maintaining a separate list
* of active timers, in order of highest to lowest cycle countdown values, as this could speed up getBurstCycles()
* and updateTimers() functions ever so slightly.
*
* @this {CPUPDP11}
* @param {function()} callBack
* @return {number} timer index