---
name: "timer_delete"
section: "2"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/timer_delete"
---

# timer\_delete(2)

delete a per-process timer (REALTIME)

## NAME

**timer\_delete** – delete a per-process timer (REALTIME)

## LIBRARY

library “librt”

## SYNOPSIS

**#include \<time.h\>**

*int*\

**timer\_delete**(*timer\_t timerid*);

## DESCRIPTION

The **timer\_delete**() system call deletes the specified timer, *timerid*, previously created by the [timer\_create(2)](/timer_create/2.md) system call. If the timer is armed when **timer\_delete**() is called, the behavior is as if the timer is automatically disarmed before removal. Pending signals for the deleted timer are cleared.

## RETURN VALUES

The **timer\_delete()** function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is 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.

## SEE ALSO

[timer\_create(2)](/timer_create/2.md)

## STANDARDS

The **timer\_delete**() system call conforms to IEEE Std 1003.1-2004 (“POSIX.1”).

## HISTORY

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