This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.
Andreas Eversberg andreas at eversberg.euPeter Stuge wrote: >> + if (usec < 0) >> >+ usec += USEC_1S; > Doesn't this also need to do sec--; ? > > >> >+ tv->tv_sec += sec; >> >+ tv->tv_usec += usec; >> >+ if (tv->tv_usec >= USEC_1S) { >> >+ tv->tv_sec++; >> >+ tv->tv_usec -= USEC_1S; >> >+ } >> >+} > Consider changing the second if() to while(), so that the function > works correctly also when adding several seconds using only the usec > parameter. dear peter, thanx for looking at the patch. i fixed the missing "sec--" and added while loops. see attachment. best regards, andreas