mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-02-01 10:31:54 +08:00
using time.monotonic() instead of time.time()
This commit is contained in:
@@ -189,7 +189,7 @@ class MsdApi:
|
|||||||
last_report_ts = 0
|
last_report_ts = 0
|
||||||
async for chunk in remote.content.iter_chunked(chunk_size):
|
async for chunk in remote.content.iter_chunked(chunk_size):
|
||||||
written = await writer.write_chunk(chunk)
|
written = await writer.write_chunk(chunk)
|
||||||
now = int(time.time())
|
now = int(time.monotonic())
|
||||||
if last_report_ts + 1 < now:
|
if last_report_ts + 1 < now:
|
||||||
await stream_write_info()
|
await stream_write_info()
|
||||||
last_report_ts = now
|
last_report_ts = now
|
||||||
|
|||||||
Reference in New Issue
Block a user