Better adjustTimeDelay() candidate algorithm

This commit is contained in:
Miroslav Stampar 2012-10-11 14:23:53 +02:00
parent e61c4c22c9
commit 56832fe9c4

View File

@ -1925,7 +1925,7 @@ def adjustTimeDelay(lastQueryDuration, lowerStdLimit):
Provides tip for adjusting time delay in time-based data retrieval Provides tip for adjusting time delay in time-based data retrieval
""" """
candidate = 1 + int(round((1 - (lastQueryDuration - lowerStdLimit) / lastQueryDuration) * conf.timeSec)) candidate = 1 + int(round(lowerStdLimit))
if candidate: if candidate:
kb.delayCandidates = [candidate] + kb.delayCandidates[:-1] kb.delayCandidates = [candidate] + kb.delayCandidates[:-1]