commit
f04c0e6460
1 changed files with 7 additions and 1 deletions
|
@ -372,7 +372,13 @@ public class SearchUICore {
|
|||
SearchResultMatcher rm = new SearchResultMatcher(matcher, phrase, request, requestNumber, totalLimit);
|
||||
rm.searchStarted(phrase);
|
||||
if (TIMEOUT_BETWEEN_CHARS > 0 && delayedExecution) {
|
||||
Thread.sleep(TIMEOUT_BETWEEN_CHARS);
|
||||
long startTime = System.currentTimeMillis();
|
||||
while (System.currentTimeMillis() - startTime <= TIMEOUT_BETWEEN_CHARS) {
|
||||
if (rm.isCancelled()) {
|
||||
return;
|
||||
}
|
||||
Thread.sleep(TIMEOUT_BEFORE_SEARCH);
|
||||
}
|
||||
} else if (TIMEOUT_BEFORE_SEARCH > 0) {
|
||||
Thread.sleep(TIMEOUT_BEFORE_SEARCH);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue