|
a/upmpd/upmpdutils.cxx |
|
b/upmpd/upmpdutils.cxx |
|
... |
|
... |
233 |
<< "</res>"
|
233 |
<< "</res>"
|
234 |
<< "</item></DIDL-Lite>";
|
234 |
<< "</item></DIDL-Lite>";
|
235 |
return ss.str();
|
235 |
return ss.str();
|
236 |
}
|
236 |
}
|
237 |
|
237 |
|
|
|
238 |
bool sleepms(int ms)
|
|
|
239 |
{
|
|
|
240 |
struct timespec duration;
|
|
|
241 |
duration.tv_sec = ms/1000;
|
|
|
242 |
ms -= 1000 * duration.tv_sec;
|
|
|
243 |
duration.tv_nsec = ms * 1000 * 1000;
|
|
|
244 |
if (nanosleep(&duration, 0))
|
|
|
245 |
return false;
|
|
|
246 |
return true;
|
|
|
247 |
}
|
238 |
|
248 |
|
239 |
// Tried on gcc + libstdc++ 4.7.2-5 on Debian, the c++11 regex package
|
249 |
// Tried on gcc + libstdc++ 4.7.2-5 on Debian, the c++11 regex package
|
240 |
// does not seem really ready from prime time. So...:
|
250 |
// does not seem really ready from prime time. So...:
|
241 |
string regsub1(const string& sexp, const string& input, const string& repl)
|
251 |
string regsub1(const string& sexp, const string& input, const string& repl)
|
242 |
{
|
252 |
{
|