import time


def fft_func_time(func, x, inverse):
    """Times various functions that takes a vector x as an input.

    Parameters:
        func (fft function): the function to be timed.
        x (array): the discrete amplitudes to transform.
        inverse (bool): whether to perform the inverse Fourier transform.
    Returns:
        end - start (float): wall clock running time in seconds of func(x).
    """
    start = time.time()
    func(x, inverse)
    end = time.time()
    return (end - start)