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

Diff of /smsdaemon/Util.h

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

revision 43 by torben, Wed Jun 11 06:46:14 2008 UTC revision 132 by torben, Sun Dec 7 00:59:05 2008 UTC
# Line 19  namespace Util Line 19  namespace Util
19          std::string str_toupper(std::string str);          std::string str_toupper(std::string str);
20          std::string str_tolower(std::string str);          std::string str_tolower(std::string str);
21    
22            std::string str_formatint(int i);
23    
24          std::string str_replace_char(std::string str, char search, char replace);          std::string str_replace_char(std::string str, char search, char replace);
25          std::string str_characters(std::string str);          std::string str_characters(std::string str);
26    
# Line 33  namespace Util Line 35  namespace Util
35          int uTimeDiff(const timeval& then, const timeval& now);          int uTimeDiff(const timeval& then, const timeval& now);
36          int mTimeDiff(const timeval& then, const timeval& now);          int mTimeDiff(const timeval& then, const timeval& now);
37    
38            timeval GetTimeOfDay();
39    
40            int my_system(const char* cmd, std::string* response = 0);
41    
42            std::string readfile(std::string filename);
43    
44          inline void Sleep(unsigned int msec)          inline void Sleep(unsigned int msec)
45          {          {
46              for (unsigned int i=0; i<msec; ++i)                  if (msec < 1000)
47                  usleep(1000);                  {
48                            usleep(1000*msec);
49                    }
50                    else
51                    {
52                    for (unsigned int i=0; i<msec; ++i)
53                            usleep(1000);
54                    }
55          }          }
56    
57  }  }

Legend:
Removed from v.43  
changed lines
  Added in v.132

  ViewVC Help
Powered by ViewVC 1.1.20