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

Diff of /smsdaemon/SmsDaemon.cpp

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

revision 92 by torben, Mon Jun 16 11:30:20 2008 UTC revision 101 by torben, Mon Jun 16 16:41:18 2008 UTC
# Line 15  Line 15 
15  #include "TaskManager.h"  #include "TaskManager.h"
16  #include "PluginManager.h"  #include "PluginManager.h"
17    
18  using namespace std;  #include "version.h"
19    
20    using namespace std;
21    
22  void SmsDaemon::CreateLogMessage(SMS& sms,bool hasPlugin)  void SmsDaemon::CreateLogMessage(SMS& sms,bool hasPlugin)
23  {  {
# Line 31  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
36            timeval now = Util::GetTimeOfDay();
37    
38            if ( Util::mTimeDiff(_lastSmsCheck,now) < INTERVAL)
39                    return;
40    
41            _lastSmsCheck = now;
42    
43          Common* cmn = Common::instance();          Common* cmn = Common::instance();
44    
45          PluginManager* manager = cmn->GetPluginManager();          PluginManager* manager = cmn->GetPluginManager();
# Line 90  void SmsDaemon::Start() Line 99  void SmsDaemon::Start()
99    
100    
101          cmn->daemonStart = time(0);          cmn->daemonStart = time(0);
102            _lastSmsCheck = Util::GetTimeOfDay();
103    
104          cmn->logMessage("--------------------------------");          cmn->logMessage("--------------------------------");
105            cmn->logMessage( VERSION );
106            cmn->logMessage( SVNVERSION );
107    
108          cmn->GetTaskManager()->LoadTasks();          cmn->GetTaskManager()->LoadTasks();
109          cmn->GetPluginManager()->LoadPlugins();          cmn->GetPluginManager()->LoadPlugins();

Legend:
Removed from v.92  
changed lines
  Added in v.101

  ViewVC Help
Powered by ViewVC 1.1.20