---
name: "PR_SET_TIMING"
section: "2const"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/PR_SET_TIMING"
---

# PR\_SET\_TIMING(2const)

set the process timing mode

## NAME

PR\_SET\_TIMING - set the process timing mode

## LIBRARY

Standard C library (*libc*, *-lc*)

## SYNOPSIS

```
#include <linux/prctl.h>  /* Definition of PR_* constants */
#include <sys/prctl.h>
```

**int prctl(PR\_SET\_TIMING, long** *mode***);**

## DESCRIPTION

Set whether to use (normal, traditional) statistical process timing or accurate timestamp-based process timing, by passing **PR\_TIMING\_STATISTICAL** or **PR\_TIMING\_TIMESTAMP** to *mode*.

## RETURN VALUE

On success, 0 is returned. On error, -1 is returned, and *errno* is set to indicate the error.

## ERRORS

- **EINVAL**

  *mode* is not **PR\_TIMING\_STATISTICAL**.

## STANDARDS

Linux.

## HISTORY

Linux 2.6.0.

## CAVEATS

**PR\_TIMING\_TIMESTAMP** is not currently implemented (attempting to set this mode will yield the error **EINVAL**).

## SEE ALSO

[**prctl**(2)](/prctl/2.md), [**PR\_GET\_TIMING**(2const)](/PR_GET_TIMING/2const.md)
