MCPcopy Create free account
hub / github.com/FEniCS/dolfinx / decorator

Function decorator

python/dolfinx/common.py:183–189  ·  view source on GitHub ↗
(func)

Source from the content-addressed store, hash-verified

181 """Decorator for timing functions."""
182
183 def decorator(func):
184 @functools.wraps(func)
185 def wrapper(*args, **kwargs):
186 with Timer(task):
187 return func(*args, **kwargs)
188
189 return wrapper
190
191 return decorator

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected