/[projects]/smsdaemon/Util.h
ViewVC logotype

Diff of /smsdaemon/Util.h

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

revision 193 by torben, Wed Dec 17 23:43:26 2008 UTC revision 203 by torben, Fri Dec 19 07:03:34 2008 UTC
# Line 44  namespace Util Line 44  namespace Util
44          timeval GetTimeOfDay();          timeval GetTimeOfDay();
45    
46          int my_system(const char* cmd, std::string* response = 0);          int my_system(const char* cmd, std::string* response = 0);
47            int my_system2(const char* cmd);
48    
49          std::string readfile(std::string filename);          std::string readfile(std::string filename);
50    
51          inline void Sleep(unsigned int msec)          inline void Sleep(unsigned int msec)
52          {          {
53                  if (msec < 1000)                  if (msec < 1000)
54                  {                  {
55                          usleep(1000*msec);                          usleep(1000*msec);
56                  }                  }
57                  else                  else
58                  {                  {
59                  for (unsigned int i=0; i<msec; ++i)                          for (unsigned int i=0; i<msec; ++i)
60                          usleep(1000);                                  usleep(1000);
61                  }                  }
62          }          }
63    

Legend:
Removed from v.193  
changed lines
  Added in v.203

  ViewVC Help
Powered by ViewVC 1.1.20