def compute_resolution(time_grid):
    """
    Compute the resolution given the time grid at which measurements are made.

    :param time_grid: The time grid on which the sample is taken.
    :return delta: the resolution
    """

    count = len(time_grid)
    delta = 0
    for i in range(len(time_grid) - 1):
        diff = time_grid[i + 1] - time_grid[i]
        delta += diff

    delta = delta/count

    return delta