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:
sentriz
2020-04-20 20:57:37 +01:00
parent e3d6e9ea8f
commit 8b1a6d6892
2 changed files with 2 additions and 2 deletions

View File

@@ -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)