mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
msd tick every 3 seconds
This commit is contained in:
@@ -199,7 +199,7 @@ class MsdFileReader(BaseMsdReader): # pylint: disable=too-many-instance-attribu
|
|||||||
self.__readed += len(chunk)
|
self.__readed += len(chunk)
|
||||||
|
|
||||||
now = time.monotonic()
|
now = time.monotonic()
|
||||||
if self.__tick + 1 < now or self.__readed == self.__file_size:
|
if self.__tick + 3 < now or self.__readed == self.__file_size:
|
||||||
self.__tick = now
|
self.__tick = now
|
||||||
self.__notifier.notify()
|
self.__notifier.notify()
|
||||||
|
|
||||||
@@ -258,7 +258,7 @@ class MsdFileWriter(BaseMsdWriter): # pylint: disable=too-many-instance-attribu
|
|||||||
self.__unsynced = 0
|
self.__unsynced = 0
|
||||||
|
|
||||||
now = time.monotonic()
|
now = time.monotonic()
|
||||||
if self.__tick + 1 < now:
|
if self.__tick + 3 < now:
|
||||||
self.__tick = now
|
self.__tick = now
|
||||||
self.__notifier.notify()
|
self.__notifier.notify()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user