Lucene.Net.Search.TimeLimitingCollector.Collect C# (CSharp) Method

Collect() public method

Calls Collector.Collect(int) on the decorated Collector unless the allowed time has passed, in which case it throws an exception. if the time allowed has exceeded.
public Collect ( int doc ) : void
doc int
return void
		public override void  Collect(int doc)
		{
			long time = TIMER_THREAD.Milliseconds;
			if (timeout < time)
			{
				if (greedy)
				{
					//System.out.println(this+"  greedy: before failing, collecting doc: "+doc+"  "+(time-t0));
					collector.Collect(doc);
				}
				//System.out.println(this+"  failing on:  "+doc+"  "+(time-t0));
                throw new TimeExceededException(timeout - t0, time - t0, docBase + doc);
			}
			//System.out.println(this+"  collecting: "+doc+"  "+(time-t0));
			collector.Collect(doc);
		}