nesca/IRCPinger_Th.cpp

62 lines
1.1 KiB
C++
Raw Normal View History

<<<<<<< HEAD
2014-09-07 18:54:46 +00:00
#pragma once
#include "IRCPinger_Th.h"
void IRCPinger_Th::doEmitChangeRedIRCData(QString str)
{
emit ircPTh->changeRedIRCData(str);
};
void IRCPinger_Th::doEmitRestartIRC()
{
emit ircPTh->RestartIRC();
};
void IRCPinger_Th::run()
{
while(iWantToConnect)
{
if(globalPinger >= 360) //6min timeout
{
#pragma region QTGUI_Area
ircPTh->doEmitChangeRedIRCData("-//- Ping timeout. Reconnecting... ");
#pragma endregion
ircPTh->doEmitRestartIRC();
globalPinger = 0;
msleep(10000);
};
++globalPinger;
msleep(1000);
};
=======
#pragma once
#include "IRCPinger_Th.h"
void IRCPinger_Th::doEmitChangeRedIRCData(QString str)
{
emit ircPTh->changeRedIRCData(str);
};
void IRCPinger_Th::doEmitRestartIRC()
{
emit ircPTh->RestartIRC();
};
void IRCPinger_Th::run()
{
while(iWantToConnect)
{
if(globalPinger >= 360) //6min timeout
{
#pragma region QTGUI_Area
ircPTh->doEmitChangeRedIRCData("-//- Ping timeout. Reconnecting... ");
#pragma endregion
ircPTh->doEmitRestartIRC();
globalPinger = 0;
msleep(10000);
};
++globalPinger;
msleep(1000);
};
>>>>>>> 5d30af667b7f24c6e91d2bf1888215f755b4378d
2014-09-07 18:54:46 +00:00
};