def timeit(method):
    """Compute the download time."""

    def wrapper(*args, **kwargs):
        start = time.time()
        result = method(*args, **kwargs)
        end = time.time()

        click.echo('Cost {}s'.format(int(end-start)))
        return result

    return wrapper
def timeit ( method ) : def wrapper ( * args , ** kwargs ) : start = time . time ( ) result = method ( * args , ** kwargs ) end = time . time ( ) click . echo ( 'Cost {}s' . format ( int ( end - start ) ) ) return result return wrapper
Compute the download time.