
import threading


class timer:
    def __init__(self, checkIn : int, period : int) -> None:
        self._checkIn = checkIn
        self._period = period 
        self._bSendCheckIn = True
        self._bSendWave = True

    def checkin_timer(self): 
        self._bSendCheckIn = True    
    
    def period_timer(self):
        self._bSendWave = True
    
    def getSendCheckInFlag(self): 
        return self._bSendCheckIn   
    
    def getSendWaveFlag(self):
        return self._bSendWave

    def setSendCheckInFlag(self, status): 
        self._bSendCheckIn = status
        threading.Timer(self._checkIn, self.checkin_timer).start()
    
    def setSendWaveFlag(self, status):
        self._bSendWave = status
        threading.Timer(self._period, self.period_timer).start()
  

    