threads / discuss / 56815

Replace setitimer(2) by timer_settime(2)

Subject: Replace setitimer(2) by timer_settime(2)

## tl;dr

One message between Oct 30, 2021 and Oct 30, 2021.

replies: 0people: 1as markdown or json

Alejandro Colomar (man-pages)· Oct 30, 2021, 20:29 UTC · lore
Hi,

POSIX deprecated settimer(2) in favor of timer_settime(2). Their interface is almost identical, but that the new syscalls use nanosecond precision (struct timespec), while the old one uses microsecond precision (struct timeval).

I'm goind to put a more prominent [[deprecated]] notice in the SYNOPSIS of the manual page.

I noticed you are using setitimer(2), so you may want to consider replacing it by timer_settime(2).

Cheers,
Alex
-- 
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/

← back to recent threads