Closed crankycyclops closed 4 years ago
Every time a call to processCommand(player) is made, spin up a timer job with the interval set to how long to wait for a command before timing out, and set the number of executions to 1. Once the user types a command, call timer->removeJob() (might have to wrap this in a try/catch block?) If the timeout time passes, the job will execute once and then go away. If the user types a command in time, then the job is removed before it can execute.
The timer job should fire an event.
This is now irrelevant due to the way input is now processed.
Some things I might want to do will involve both a command timeout event (if user doesn't enter a command in a given number of seconds, a commandTimeout event will be triggered) and knowing how many clock ticks have elapsed since user entered the last command. Investigate this.