Splay a salt function call execution time across minions over
    a number of seconds (default: 300)

    .. note::
        You *probably* want to use --async here and look up the job results later.
        If you're dead set on getting the output from the CLI command, then make
        sure to set the timeout (with the -t flag) to something greater than the
        splaytime (max splaytime + time to execute job).
        Otherwise, it's very likely that the cli will time out before the job returns.

    CLI Example:

    .. code-block:: bash

        # With default splaytime
        salt --async --module-executors='[splay, direct_call]' '*' pkg.install cowsay version=3.03-8.el6

    .. code-block:: bash

        # With specified splaytime (5 minutes) and timeout with 10 second buffer
        salt -t 310 --module-executors='[splay, direct_call]' --executor-opts='{splaytime: 300}' '*' pkg.version cowsay

def execute(opts, data, func, args, kwargs):
    '''
    Splay a salt function call execution time across minions over
    a number of seconds (default: 300)

    .. note::
        You *probably* want to use --async here and look up the job results later.
        If you're dead set on getting the output from the CLI command, then make
        sure to set the timeout (with the -t flag) to something greater than the
        splaytime (max splaytime + time to execute job).
        Otherwise, it's very likely that the cli will time out before the job returns.

    CLI Example:

    .. code-block:: bash

        # With default splaytime
        salt --async --module-executors='[splay, direct_call]' '*' pkg.install cowsay version=3.03-8.el6

    .. code-block:: bash

        # With specified splaytime (5 minutes) and timeout with 10 second buffer
        salt -t 310 --module-executors='[splay, direct_call]' --executor-opts='{splaytime: 300}' '*' pkg.version cowsay
    '''
    if 'executor_opts' in data and 'splaytime' in data['executor_opts']:
        splaytime = data['executor_opts']['splaytime']
    else:
        splaytime = opts.get('splaytime', _DEFAULT_SPLAYTIME)
    if splaytime <= 0:
        raise ValueError('splaytime must be a positive integer')
    fun_name = data.get('fun')
    my_delay = _calc_splay(splaytime)
    log.debug("Splay is sleeping %s secs on %s", my_delay, fun_name)

    time.sleep(my_delay)
    return None