def get_interval_timestamps(fromtime, endtime, interval):
    """
    获取从fromtime到endtime, 每隔interval秒的时间戳, [fromtime, endtime) 包括fromtime， 不包括endtime
    fromtime: timestamp (float)
    endtime: timestamp (float)
    interval: seconds (int)
    """
    if fromtime >= endtime:
        return []
    ts = []
    while fromtime < endtime:
        ts.append(fromtime)
        fromtime = fromtime + interval

    if ts and ts[-1] + interval < endtime:
        ts.append(endtime)
    return ts