new
This commit is contained in:
1 parent
571cddedba
commit
1934fdfc63
8 files changed
+134
-46
No files matched your search
@@ -0,0 +1,11 @@
|
||||
import time
|
||||
import functools
|
||||
|
||||
def timing(func):
|
||||
@functools.wraps(func)
|
||||
def wrapper(*args, **kwargs):
|
||||
start = time.perf_counter()
|
||||
result = func(*args, **kwargs)
|
||||
print(f"Dauer: {time.perf_counter() - start:.4f}s")
|
||||
return result
|
||||
return wrapper
|
||||
Reference in new issue
Block a user