Created by: zeffii
adds timed context_manager, which returns a function. and prints the duration of the context manager. usage
from sverchok.utils.context_managers import timed
...
with timed(your_func) as func:
result = func(....)
...
useful for general timing functions, it is extended to behave with no functions and just time how long it takes to exit.
from sverchok.utils.context_managers import timepart
...
with timepart("named section x"):
# some code here
...
the easier it is to time functions and section of code, the better.