[downloader:http] use 'time.monotonic()'

This commit is contained in:
Mike Fährmann
2023-01-31 15:32:12 +01:00
parent 4572c122d8
commit d16873941c

View File

@@ -296,11 +296,10 @@ class HttpDownloader(DownloaderBase):
progress = self.progress progress = self.progress
bytes_downloaded = 0 bytes_downloaded = 0
time_start = time.time() time_start = time.monotonic()
for data in content: for data in content:
time_current = time.time() time_elapsed = time.monotonic() - time_start
time_elapsed = time_current - time_start
bytes_downloaded += len(data) bytes_downloaded += len(data)
write(data) write(data)