Teletype Delay Limitations

From what I’ve gathered the timer interrupt occurs every 1 tick. Every 10 ticks the clock timer callback is called from process_timers(), which then posts an event for the EventTimer handler. Then when main checks for events it will process the EventTimer handler if it’s at the front of the queue. Do you know how much of a delay there can be until the event is processed in an average/worst case scenario?

I know we’re getting into some abstract territory here, so don’t feel obligated to give me detailed answers as this is mostly for my own curiosity.

this can vary greatly depending on how busy the event queue is and the actual events. imagine a script that takes some time to execute (something like L 0 32767: ...). now trigger this script repeatedly with a keyboard shortcut (keyboard presses are also handled by the event queue). this would also add to the delay time. in the extreme it’s possible to completely jam the queue (as it has limited size - for a good reason), in which case any new events are simply discarded. this is also why it becomes less responsive if you’re running metro at extreme rates.

1 Like