def exec_and_timeit(func):
 def wrapper(*arg):
  t1 = time()
  res = func(*arg)
  t2 = time()
  ms = ((t2 - t1) * 1000.0)
  return (res, ms)
 return wrapper

def exec_and_timeit ( func ) : def wrapper ( * arg ) : t1 = time ( ) res = func ( * arg ) t2 = time ( ) ms = ( ( t2 - t1 ) * 1000.0 ) return ( res , ms ) return wrapper
decorator that returns both function results and execution time .