You can create a supervisor rule which checks for the status of the ticket and also add an additional condition which would check for how long it has been since the agent has responded and set the action to Close the ticket.