def _base(last, now, lap, offset, multiple, attr):
    """
    last - last datetime
    now - current datetime
    lap - at what point to "roll over"
    offset - how many seconds between laps
    attr - what to look at
    multiple - what to multiply attr by to get seconds
    """
    diff = round(now.timestamp(), 0) - round(last.timestamp(), 0)
    min_gap = offset - getattr(last, attr) * multiple
    if diff > offset:
        return True
    if getattr(last, attr) < lap:
        if getattr(now, attr) >= lap:
            return True
        return False
    elif getattr(now, attr) >= lap and diff >= min_gap:
        return True
    return False
