import time


def total_time(func):
    """
    Calculate the running time of the function
    :param func: the function need to been calculated
    :return: func's result
    """
    def call_fun(*args, **kwargs):
        start_time = time.time()
        f = func(*args, **kwargs)
        end_time = time.time()
        print('[INFO]:%s() run time:%ss' % (func.__name__, end_time - start_time))
        return f
    return call_fun