♻️ Py3: Remove use of glob_escape & monotonic_time & mark deprecated

Those are natively available in Python 3.
This commit is contained in:
Gina Häußge committed 2020-10-21 19:01:02 +02:00
1 parent d2298a8092
commit ac347c4e06
16 files changed
+101 -98

No files matched your search

@@ -4,8 +4,6 @@ __copyright__ = "Copyright (C) 2018 The OctoPrint Project - Released under terms
import time
from octoprint.util import monotonic_time
def can_perform_update(target, check, online=True):
return True
@@ -14,9 +12,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_time()
now = time.monotonic()
end = now + duration
while now < end:
log_cb(["{}s left...".format(end - now)], prefix=">", stream="output")
time.sleep(5)
now = monotonic_time()
now = time.monotonic()