Demo entry 5931592



Submitted by sdfsd on Sep 06, 2016 at 00:17
Language: Python 3. Code size: 275 Bytes.

def time_interval_decorator(fn):
    def time_interval_wrapped_fn(*args, **kwargs):
        start_time = time.time()
        fn_res = fn(*args, **kwargs)
        stop_time = time.time()
        return (fn_res, stop_time - start_time)
    return time_interval_wrapped_fn

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).