mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Use monotonic for worker launch time tracking
This commit is contained in:
parent
b54aff0383
commit
d0f617307f
@ -212,7 +212,7 @@ class Server(Thread):
|
||||
self.start()
|
||||
|
||||
def launch_worker(self, gui=False, redirect_output=None, job_name=None):
|
||||
start = time.time()
|
||||
start = time.monotonic()
|
||||
with self._worker_launch_lock:
|
||||
self.launched_worker_count += 1
|
||||
id = self.launched_worker_count
|
||||
@ -231,7 +231,7 @@ class Server(Thread):
|
||||
if isinstance(cw, string_or_bytes):
|
||||
raise CriticalError('Failed to launch worker process:\n'+force_unicode(cw))
|
||||
if DEBUG:
|
||||
print('Worker Launch took:', time.time() - start)
|
||||
print('Worker Launch took:', time.monotonic() - start)
|
||||
return cw
|
||||
|
||||
def do_launch(self, env, gui, redirect_output, rfile, job_name=None):
|
||||
|
Loading…
x
Reference in New Issue
Block a user