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 |
|
|
43 |
inline void Sleep(unsigned int msec) |
inline void Sleep(unsigned int msec) |
44 |
{ |
{ |
45 |
for (unsigned int i=0; i<msec; ++i) |
if (msec < 1000) |
46 |
usleep(1000); |
{ |
47 |
|
usleep(1000*msec); |
48 |
|
} |
49 |
|
else |
50 |
|
{ |
51 |
|
for (unsigned int i=0; i<msec; ++i) |
52 |
|
usleep(1000); |
53 |
|
} |
54 |
} |
} |
55 |
|
|
56 |
} |
} |