import time


def measure_command(func, kwargs):
    """ Measures the execution time of a function

    :param func: function
    :param kwargs: dict
        keyword arguments
    :return: float, result
        (time, result of fucntion)
    """
    time_start = time.time()
    r = func(**kwargs)
    dt = time.time() - time_start

    return dt, r