use total_seconds() when calculating search change diff
as tested like: $ python -c "from datetime import datetime; import time; a = datetime.now(); time.sleep(0.5); b = datetime.now(); print((b-a).seconds)" 0 $ python -c "from datetime import datetime; import time; a = datetime.now(); time.sleep(0.5); b = datetime.now(); print((b-a).total_seconds())" 0.50064
This commit is contained in:
@@ -1030,7 +1030,7 @@ class CacheManager(metaclass=Singleton):
|
||||
# This future actually does the search and calls the
|
||||
# search_callback when each of the futures completes.
|
||||
def do_search():
|
||||
# Sleep far a little while before returning the local results.
|
||||
# Sleep for a little while before returning the local results.
|
||||
# They are less expensive to retrieve (but they still incur
|
||||
# some overhead due to the GTK UI main loop queue).
|
||||
sleep(0.2)
|
||||
|
Reference in New Issue
Block a user