TIMER_DELETE(2)

πŸ’– TIMER_DELETE(2) πŸ’–

okay bestie, so this one's from the System Calls Manual β€” it's timer_delete, and yes it does exactly what the name says. no cap.


✨ NAME ✨

timer_delete β€” delete a per-process timer (REALTIME)


πŸ“š LIBRARY πŸ“š

POSIX Real-time Library (librt, -lrt)

like, link it with -lrt or she's not showing up to the function, fr fr.


🫢 SYNOPSIS 🫢

#include <time.h>

int
timer_delete(timer_t timerid);

🌸 DESCRIPTION 🌸

so the timer_delete() system call does one thing and it does it iconically: it deletes the timer you point at with timerid β€” and that timer had to have been created earlier by timer_create(2), no exceptions, she only works with her own kind πŸ’…

and listen, if the timer is still armed when you call timer_delete()? the behavior is as if the timer gets automatically disarmed before it's removed. she doesn't leave a mess. she just goes.

also β€” pending signals for the deleted timer are cleared. gone. bye. not haunting you later. periodt. 🧹


πŸ‘‘ RETURN VALUES πŸ‘‘

  • on a successful completion, the value 0 is returned ✨
  • otherwise, the value -1 is returned and the global variable errno gets set to indicate the error 😭

πŸ’€ ERRORS πŸ’€

the timer_delete() system call will fail if:

  • [EINVAL] β€” the timer ID specified by timerid is not a valid timer ID. like, that's not a real timer, bestie, i can't delete what doesn't exist πŸ™ˆ

πŸ”₯ SEE ALSO πŸ”₯


🌈 STANDARDS 🌈

the timer_delete() system call conforms to IEEE Std 1003.1-2004 (β€œPOSIX.1”). certified. validated. ate. πŸ’œ


⭐ HISTORY ⭐

Support for POSIX per-process timer first appeared in FreeBSD 7.0.


and that's the whole page, bestie πŸŽ€ this one came to you from Debian, dated September 11, 2000 β€” so yeah, she's been iconic for a minute. mwah πŸ’…βœ¨

πŸ“¦ where this page comes from