//
// Created by WJG on 2020-11-24.
//

#ifndef NEWCOSS_TIMERWORKER_H
#define NEWCOSS_TIMERWORKER_H

#include "../MsgSchedule/CThread.h"

class TimerWorker : public CThread{
public:
    TimerWorker(int delay_second, bool is_loop);
    void Run() override ;
    void stopRun();
    void setDelayTime(int t_second);
    void setMsgData(std::string source, std::string target, std::string msg);

private:
    unsigned int counter;
    unsigned int delay_time;
    bool is_looping;
    bool is_stop;
    std::string msg_target;
    std::string msg_source;
    std::string mgs_body;
};

#endif //NEWCOSS_TIMERWORKER_H
