Use octoprint.util.monotonic_time instead of monotonic
This commit is contained in:
1 parent
f981cca47e
commit
70254e910c
2 files changed
+8
-7
No files matched your search
@@ -5,9 +5,10 @@ __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agp
|
||||
__copyright__ = "Copyright (C) 2018 The OctoPrint Project - Released under terms of the AGPLv3 License"
|
||||
|
||||
|
||||
import monotonic
|
||||
import time
|
||||
|
||||
from octoprint.util import monotonic_time
|
||||
|
||||
def can_perform_update(target, check, online=True):
|
||||
return True
|
||||
|
||||
@@ -15,9 +16,9 @@ def can_perform_update(target, check, online=True):
|
||||
def perform_update(target, check, target_version, log_cb=None, online=True):
|
||||
duration = check.get("duration", 30)
|
||||
|
||||
now = monotonic.monotonic()
|
||||
now = monotonic_time()
|
||||
end = now + duration
|
||||
while now < end:
|
||||
log_cb(["{}s left...".format(end - now)], prefix=">", stream="output")
|
||||
time.sleep(5)
|
||||
now = monotonic.monotonic()
|
||||
now = monotonic_time()
|
||||
Reference in new issue
Block a user