/[projects]/smsdaemon/SmsDaemon.cpp
ViewVC logotype

Diff of /smsdaemon/SmsDaemon.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 127 by torben, Sat Dec 6 14:25:53 2008 UTC revision 128 by torben, Sat Dec 6 15:13:34 2008 UTC
# Line 32  void SmsDaemon::CreateLogMessage(SMS& sm Line 32  void SmsDaemon::CreateLogMessage(SMS& sm
32    
33  void SmsDaemon::CheckSms()  void SmsDaemon::CheckSms()
34  {  {
35          const int INTERVAL = 250; //no of milliseconds between sms checks          const int INTERVAL = 1000; //no of milliseconds between sms checks
36          timeval now = Util::GetTimeOfDay();          timeval now = Util::GetTimeOfDay();
37    
38          if ( Util::mTimeDiff(_lastSmsCheck,now) < INTERVAL)          if ( Util::mTimeDiff(_lastSmsCheck,now) < INTERVAL)
# Line 78  void SmsDaemon::MainLoop() Line 78  void SmsDaemon::MainLoop()
78    
79          mainContinue = true;          mainContinue = true;
80    
         int loopcount = 0;  
81          while (mainContinue)          while (mainContinue)
82          {          {
                 if (loopcount > 100 )  
                 {  
                         CheckSms();  
83    
84                          cmn->GetTaskManager()->ExecuteTasks(_modem);                  CheckSms();
85    
86                          loopcount = 0;                  cmn->GetTaskManager()->ExecuteTasks(_modem);
                 }  
87    
88                  if (cmn->isDebug && kbhit())                  if (cmn->isDebug && kbhit())
89                          break;                          break;
90    
91                  loopcount++;                  Util::Sleep(100);
                 Util::Sleep(10);  
92    
93          }          }
94  }  }

Legend:
Removed from v.127  
changed lines
  Added in v.128

  ViewVC Help
Powered by ViewVC 1.1.20