import time


def profile_timer(f, *args, **kwargs):
    """
    A wrapper to run functions and tell us how long they took
    :param f: function to run
    :param args: ordered parameters
    :param kwargs: keyword parameters
    :return: value of f for those parameters
    """
    t0 = time.time()
    result = f(*args, **kwargs)
    t1 = time.time()
    print("{} ran in {:.3f} sec".format(f.__name__, t1-t0))
    return result