Added support for query timeout (maxTime).