import time


def measure(func):
    """
    Measure execution time for passed function
    :param func: the function
    :return: time elapsed
    """
    tick = time.time()
    func()
    tock = time.time()
    return tock - tick