|
a/libupnpp/upnpplib.cxx |
|
b/libupnpp/upnpplib.cxx |
|
... |
|
... |
449 |
++it1; ++it2;
|
449 |
++it1; ++it2;
|
450 |
}
|
450 |
}
|
451 |
return size1 == size2 ? 0 : -1;
|
451 |
return size1 == size2 ? 0 : -1;
|
452 |
}
|
452 |
}
|
453 |
}
|
453 |
}
|
|
|
454 |
|
|
|
455 |
#include "upnpputils.hxx"
|
|
|
456 |
|
|
|
457 |
namespace UPnPP {
|
|
|
458 |
|
|
|
459 |
static const long long BILLION = 1000 * 1000 * 1000;
|
|
|
460 |
|
|
|
461 |
void timespec_addnanos(struct timespec *ts, long long nanos)
|
|
|
462 |
{
|
|
|
463 |
nanos = nanos + ts->tv_nsec;
|
|
|
464 |
int secs = 0;
|
|
|
465 |
if (nanos > BILLION) {
|
|
|
466 |
secs = nanos / BILLION;
|
|
|
467 |
nanos -= secs * BILLION;
|
|
|
468 |
}
|
|
|
469 |
ts->tv_sec += secs;
|
|
|
470 |
ts->tv_nsec = nanos;
|
|
|
471 |
}
|
|
|
472 |
|
|
|
473 |
}
|