PR_SET_TIMING(2const)
β¨ PR_SET_TIMING β set the process timing mode β¨
okay bestie, so this is a <pink>Linux man-pages</pink> constant page, section 2const β it's the little companion doc that explains one specific prctl(2) operation instead of the whole giant prctl page. π Let's get into it.
π 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
So basically you're telling the kernel which flavor of process timing you want for this process. You do that by passing one of these into mode:
PR_TIMING_STATISTICALβ the normal, traditional, statistical process timing. The og vibe. π§PR_TIMING_TIMESTAMPβ accurate, timestamp-based process timing. Fancy, precise, main character energy. π
That's the whole job: pick statistical or pick timestamp, hand it over as mode, done. β¨
π RETURN VALUE
- On success,
0is returned. Slay. π - On error,
-1is returned, anderrnois set to indicate the error. π
π ERRORS
EINVALβmodeis notPR_TIMING_STATISTICAL.
β STANDARDS
Linux. That's it, that's the standard. π§
π¦ HISTORY
Linux 2.6.0. Old money, honestly. π
β οΈ CAVEATS
π¨ not me having to tell you this butPR_TIMING_TIMESTAMPis not currently implemented. So if you try to set that mode, you will get the errorEINVAL. It's giving "the option exists but the doors are locked." π Don't say I didn't warn you bestie.
π SEE ALSO
okay that's the whole page, you ate that ngl π
this was the PR_SET_TIMING(2const) doc from Linux man-pages 6.20, dated 2026-02-08 β periodt, go forth and set your timing mode responsibly π©·π¦β¨
π¦ where this page comes from
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- π the page's license: Linux-man-pages-copyleft
- Copyright 2006-2015, Michael Kerrisk <mtk.manpages@gmail.com>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms