diff options
author | 2015-05-12 02:17:30 +0200 | |
---|---|---|
committer | 2015-05-12 03:22:32 +0200 | |
commit | 000426c9d890ba2a71625a7454f9c573f10b9bae (patch) | |
tree | 8fa66da5061b850778f72f84038d9bb8bfa31f2f /pyload/manager/Scheduler.py | |
parent | 'from os' -> 'import os' and so on... (diff) | |
download | pyload-000426c9d890ba2a71625a7454f9c573f10b9bae.tar.xz |
'from time' -> 'import time' and so on...
Diffstat (limited to 'pyload/manager/Scheduler.py')
-rw-r--r-- | pyload/manager/Scheduler.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pyload/manager/Scheduler.py b/pyload/manager/Scheduler.py index d7098ae10..630e43022 100644 --- a/pyload/manager/Scheduler.py +++ b/pyload/manager/Scheduler.py @@ -2,9 +2,9 @@ # @author: mkaay import threading +import time from heapq import heappop, heappush -from time import time class AlreadyCalled(Exception): @@ -42,7 +42,7 @@ class Scheduler(object): def addJob(self, t, call, args=[], kwargs={}, threaded=True): d = Deferred() - t += time() + t += time.time() j = Job(t, call, args, kwargs, d, threaded) self.queue.put((t, j)) return d @@ -72,7 +72,7 @@ class Scheduler(object): if not j: break else: - if t <= time(): + if t <= time.time(): j.start() else: self.queue.put((t, j)) |