def ramp_value_to_time(ramp_value):
    """Convert the given LCN ramp value into a time.

    :param    int    ramp_value:    The LCN ramp value (0..250).

    :returns: The ramp time in milliseconds.
    :rtype: int
    """
    if not 0 <= ramp_value <= 250:
        raise ValueError('Ramp value has to be in range 0..250.')
    if ramp_value < 10:
        times = [0, 250, 500, 660, 1000, 1400, 2000, 3000, 4000, 5000]
        t = times[ramp_value]
    else:
        t = int(((ramp_value - 10) * 2 + 6) * 1000)
    return t
