devopsec left a comment (kamailio/kamailio#4517)

made a few more improvements...
- no limiting unsigned int for interval anymore
- fix get time functions to use nanosecond precision
- move all sync timers to greatest precision possible (nanoseconds)
- improve resyncing on sync / synced slice timers

previously the execution was like this (for a 100ms interval):

```
2025-12-09T22:42:07.530361+00:00 edge-sbc /usr/sbin/kamailio[1142260]: INFO: 
[/etc/kamailio/routes.cfg:1498:PTIMER_LOOP] [123:OPTIONS:<null>] name=NIC 
type=3 interval=100ms nworkers=1 worker=0 1142260 ntasks=0 tasks=0 nslices=10 
slice=3
2025-12-09T22:42:07.630580+00:00 edge-sbc /usr/sbin/kamailio[1142260]: INFO: 
[/etc/kamailio/routes.cfg:1498:PTIMER_LOOP] [123:OPTIONS:<null>] name=NIC 
type=3 interval=100ms nworkers=1 worker=0 1142260 ntasks=0 tasks=0 nslices=10 
slice=4
2025-12-09T22:42:07.730810+00:00 edge-sbc /usr/sbin/kamailio[1142260]: INFO: 
[/etc/kamailio/routes.cfg:1498:PTIMER_LOOP] [123:OPTIONS:<null>] name=NIC 
type=3 interval=100ms nworkers=1 worker=0 1142260 ntasks=0 tasks=0 nslices=10 
slice=5
2025-12-09T22:42:07.830923+00:00 edge-sbc /usr/sbin/kamailio[1142260]: INFO: 
[/etc/kamailio/routes.cfg:1498:PTIMER_LOOP] [123:OPTIONS:<null>] name=NIC 
type=3 interval=100ms nworkers=1 worker=0 1142260 ntasks=0 tasks=0 nslices=10 
slice=6
2025-12-09T22:42:07.931146+00:00 edge-sbc /usr/sbin/kamailio[1142260]: INFO: 
[/etc/kamailio/routes.cfg:1498:PTIMER_LOOP] [123:OPTIONS:<null>] name=NIC 
type=3 interval=100ms nworkers=1 worker=0 1142260 ntasks=0 tasks=0 nslices=10 
slice=7
2025-12-09T22:42:08.031332+00:00 edge-sbc /usr/sbin/kamailio[1142260]: INFO: 
[/etc/kamailio/routes.cfg:1498:PTIMER_LOOP] [123:OPTIONS:<null>] name=NIC 
type=3 interval=100ms nworkers=1 worker=0 1142260 ntasks=0 tasks=0 nslices=10 
slice=8
2025-12-09T22:42:08.131583+00:00 edge-sbc /usr/sbin/kamailio[1142260]: INFO: 
[/etc/kamailio/routes.cfg:1498:PTIMER_LOOP] [123:OPTIONS:<null>] name=NIC 
type=3 interval=100ms nworkers=1 worker=0 1142260 ntasks=0 tasks=0 nslices=10 
slice=9
2025-12-09T22:42:08.232060+00:00 edge-sbc /usr/sbin/kamailio[1142260]: INFO: 
[/etc/kamailio/routes.cfg:1498:PTIMER_LOOP] [123:OPTIONS:<null>] name=NIC 
type=3 interval=100ms nworkers=1 worker=0 1142260 ntasks=0 tasks=0 nslices=10 
slice=0
2025-12-09T22:42:08.332043+00:00 edge-sbc /usr/sbin/kamailio[1142260]: INFO: 
[/etc/kamailio/routes.cfg:1498:PTIMER_LOOP] [123:OPTIONS:<null>] name=NIC 
type=3 interval=100ms nworkers=1 worker=0 1142260 ntasks=0 tasks=0 nslices=10 
slice=1
2025-12-09T22:42:08.432155+00:00 edge-sbc /usr/sbin/kamailio[1142260]: INFO: 
[/etc/kamailio/routes.cfg:1498:PTIMER_LOOP] [123:OPTIONS:<null>] name=NIC 
type=3 interval=100ms nworkers=1 worker=0 1142260 ntasks=0 tasks=0 nslices=10 
slice=2
2025-12-09T22:42:08.532390+00:00 edge-sbc /usr/sbin/kamailio[1142260]: INFO: 
[/etc/kamailio/routes.cfg:1498:PTIMER_LOOP] [123:OPTIONS:<null>] name=NIC 
type=3 interval=100ms nworkers=1 worker=0 1142260 ntasks=0 tasks=0 nslices=10 
slice=3
```

now its cleaned up to a very tight timing:

```
2025-12-11T00:42:34.648276+00:00 edge-sbc /usr/sbin/kamailio[1162815]: INFO: 
[/etc/kamailio/routes.cfg:1498:PTIMER_LOOP] [123:OPTIONS:<null>] name=NIC 
type=3 interval=100ms nworkers=1 worker=0 1162815 ntasks=0 tasks=0 nslices=10 
slice=1
2025-12-11T00:42:34.748406+00:00 edge-sbc /usr/sbin/kamailio[1162815]: INFO: 
[/etc/kamailio/routes.cfg:1498:PTIMER_LOOP] [123:OPTIONS:<null>] name=NIC 
type=3 interval=100ms nworkers=1 worker=0 1162815 ntasks=0 tasks=0 nslices=10 
slice=2
2025-12-11T00:42:34.848255+00:00 edge-sbc /usr/sbin/kamailio[1162815]: INFO: 
[/etc/kamailio/routes.cfg:1498:PTIMER_LOOP] [123:OPTIONS:<null>] name=NIC 
type=3 interval=100ms nworkers=1 worker=0 1162815 ntasks=0 tasks=0 nslices=10 
slice=3
2025-12-11T00:42:34.948355+00:00 edge-sbc /usr/sbin/kamailio[1162815]: INFO: 
[/etc/kamailio/routes.cfg:1498:PTIMER_LOOP] [123:OPTIONS:<null>] name=NIC 
type=3 interval=100ms nworkers=1 worker=0 1162815 ntasks=0 tasks=0 nslices=10 
slice=4
2025-12-11T00:42:35.048306+00:00 edge-sbc /usr/sbin/kamailio[1162815]: INFO: 
[/etc/kamailio/routes.cfg:1498:PTIMER_LOOP] [123:OPTIONS:<null>] name=NIC 
type=3 interval=100ms nworkers=1 worker=0 1162815 ntasks=0 tasks=0 nslices=10 
slice=5
2025-12-11T00:42:35.148299+00:00 edge-sbc /usr/sbin/kamailio[1162815]: INFO: 
[/etc/kamailio/routes.cfg:1498:PTIMER_LOOP] [123:OPTIONS:<null>] name=NIC 
type=3 interval=100ms nworkers=1 worker=0 1162815 ntasks=0 tasks=0 nslices=10 
slice=6
2025-12-11T00:42:35.248209+00:00 edge-sbc /usr/sbin/kamailio[1162815]: INFO: 
[/etc/kamailio/routes.cfg:1498:PTIMER_LOOP] [123:OPTIONS:<null>] name=NIC 
type=3 interval=100ms nworkers=1 worker=0 1162815 ntasks=0 tasks=0 nslices=10 
slice=7
2025-12-11T00:42:35.348319+00:00 edge-sbc /usr/sbin/kamailio[1162815]: INFO: 
[/etc/kamailio/routes.cfg:1498:PTIMER_LOOP] [123:OPTIONS:<null>] name=NIC 
type=3 interval=100ms nworkers=1 worker=0 1162815 ntasks=0 tasks=0 nslices=10 
slice=8
2025-12-11T00:42:35.448264+00:00 edge-sbc /usr/sbin/kamailio[1162815]: INFO: 
[/etc/kamailio/routes.cfg:1498:PTIMER_LOOP] [123:OPTIONS:<null>] name=NIC 
type=3 interval=100ms nworkers=1 worker=0 1162815 ntasks=0 tasks=0 nslices=10 
slice=9
2025-12-11T00:42:35.548506+00:00 edge-sbc /usr/sbin/kamailio[1162815]: INFO: 
[/etc/kamailio/routes.cfg:1498:PTIMER_LOOP] [123:OPTIONS:<null>] name=NIC 
type=3 interval=100ms nworkers=1 worker=0 1162815 ntasks=0 tasks=0 nslices=10 
slice=0
2025-12-11T00:42:35.648312+00:00 edge-sbc /usr/sbin/kamailio[1162815]: INFO: 
[/etc/kamailio/routes.cfg:1498:PTIMER_LOOP] [123:OPTIONS:<null>] name=NIC 
type=3 interval=100ms nworkers=1 worker=0 1162815 ntasks=0 tasks=0 nslices=10 
slice=1
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4517#issuecomment-3639554985
You are receiving this because you are subscribed to this thread.

Message ID: <kamailio/kamailio/pull/4517/[email protected]>
_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to