TIMER_DELETE(3POSIX)

πŸ’– TIMER_DELETE(3POSIX) πŸ’–

okay bestie, welcome to the POSIX Programmer's Manual ✨ this little page is living in the POSIX manual, and ngl you should know that the Linux implementation of this interface may differ (so like, go check the corresponding Linux manual page for the deets on Linux behavior), or honestly? the interface might not even be implemented on Linux. πŸ™ˆ vibe check first, always.


🌸 PROLOG 🌸

This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux.


✨ NAME ✨

timer_delete β€” delete a per-process timer πŸ•πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <time.h>

int timer_delete(timer_t timerid);

πŸ¦‹ DESCRIPTION πŸ¦‹

So the timer_delete() function deletes the specified timer, timerid, which you previously created with the timer_create() function. iconic behavior honestly.

If the timer is armed when timer_delete() is called, the behavior shall be as if the timer is automatically disarmed before removal β€” like, it gets un-armed first, no extra steps, the function handles it. πŸ’«

The disposition of pending signals for the deleted timer is unspecified. (iykyk β€” unspecified means don't come for it, the standard isn't promising you anything there. 😭)

⚠️ The behavior is undefined if the value specified by the timerid argument to timer_delete() does not correspond to a timer ID returned by timer_create() but not yet deleted by timer_delete(). fr fr, don't pass a fake ID, that's not the move.

πŸ‘‘ RETURN VALUE πŸ‘‘

If successful, the timer_delete() function shall return a value of zero. slay. πŸŽ‰

Otherwise, the function shall return a value of -1 and set errno to indicate the error. not the vibe, but at least it tells you.


πŸ’€ ERRORS πŸ’€

No errors are defined. literally zero. nothing in the list. πŸ’…

The following sections are informative. (so like, the next bits are the bonus commentary, not the rules-rules.)


πŸ“ EXAMPLES πŸ“

None. 🫢 (yes bestie, empty. no examples for us today.)


🌈 APPLICATION USAGE 🌈

None. πŸ’œ also empty. we're just vibing.


🧚 RATIONALE 🧚

If an implementation detects that the value specified by the timerid argument to timer_delete() does not correspond to a timer ID returned by timer_create() but not yet deleted by timer_delete(), it is recommended that the function should fail and report an [EINVAL] error. so like, ideally it clocks the bogus ID and hits you with that [EINVAL]. recommended, not mandated β€” read that carefully. πŸ‘€


⭐ FUTURE DIRECTIONS ⭐

None. the future is... empty of directions. 😌


πŸ”₯ SEE ALSO πŸ”₯

  • timer_create()
  • The Base Definitions volume of POSIX.1‐2017, <time.h>

Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .

Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .


and that's the whole page bestie, mwah πŸ’‹ this masterpiece was brought to you by IEEE/The Open Group, dated 2017, and it answers to the name TIMER_DELETE(3POSIX) β€” take care of it, periodt. πŸŽ€βœ¨πŸ¦‹