import time


def run_time_calc(func):
    """
    Calculate the run time of a function.
    """
    def wrapper(*args, **kwargs):
        start = time.time()
        ans = func(*args, **kwargs)
        end = time.time()
        print('\nRun time of function [%s] is %.2f.' % (func.__name__,
                                                        end - start))
        return ans
    return wrapper