/// <summary> Create a TimeLimitedCollector wrapper over another HitCollector with a specified timeout.</summary> /// <param name="hc">the wrapped HitCollector /// </param> /// <param name="timeAllowed">max time allowed for collecting hits after which {@link TimeExceededException} is thrown /// </param> public TimeLimitedCollector(HitCollector hc, long timeAllowed) { InitBlock(); this.hc = hc; t0 = TIMER_THREAD.GetMilliseconds(); this.timeout = t0 + timeAllowed; }
/// <summary> Create a TimeLimitedCollector wrapper over another {@link Collector} with a specified timeout.</summary> /// <param name="collector">the wrapped {@link Collector} /// </param> /// <param name="timeAllowed">max time allowed for collecting hits after which {@link TimeExceededException} is thrown /// </param> public TimeLimitingCollector(Collector collector, long timeAllowed) { InitBlock(); this.collector = collector; t0 = TIMER_THREAD.GetMilliseconds(); this.timeout = t0 + timeAllowed; }