import time
import statistics


def time_fib(funcs, n):
    """
    Compute the median computation time of a Fibonnaci function

    Parameters
    ----------
    n : integer
        the nth Fibonnaci number in the sequence
    funcs : Different Fibonnaci functions to test

    Returns
    -------
    the median runtime in ms over 10 repetitions 
    of the same function call

    """
    time_res = []
    
    for i in range(10):
        start = time.perf_counter()
        funcs(n) 
        time_res.append(time.perf_counter() - start)
    return ( 1000 * statistics.median(time_res) )