def SPOT_time(tp, interval):
    """
    Determines if the timeperiod is valid for generating an ITS Spot message

    :param tp: float of current time period
    :param interval: float of the frequency for checking ITS Spot behavior record triggers
    :return: True is the tp is valid, otherwise False
    """

    l = [str(x) for x in range(0, 10, int(str(interval)[-1]))]

    if str(tp)[-1] in l:
        return True

    return False