Add timeout support to readline.