mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-16 12:21:13 +00:00
Simplify decorator duration check logic.
This commit is contained in:
parent
03a5d476b3
commit
c4cd66ea1b
1 changed files with 1 additions and 1 deletions
|
|
@ -94,7 +94,7 @@ def synchronize (lock, func, log_duration_secs=0):
|
|||
t = time.time()
|
||||
with lock:
|
||||
duration = time.time() - t
|
||||
if log_duration_secs and duration > log_duration_secs:
|
||||
if duration > log_duration_secs > 0:
|
||||
print >> sys.stderr, "WARN:", func.__name__, "locking took %0.2f seconds" % duration
|
||||
return func(*args, **kwargs)
|
||||
return update_func_meta(newfunc, func)
|
||||
|
|
|
|||
Loading…
Reference in a new issue