def duration(config_duration: str) ->int:
    """
    Convert the config duration to an integer.

    :param config_duration: The duration as a string
    :return: The duration as an integer
    """
    my_duration = int(config_duration)
    if my_duration < 1:
        raise ValueError('A slot must be at least 1 second long')
    return my_duration
