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, 0 is returned. Slay. πŸ’–
  • On error, -1 is returned, and errno is set to indicate the error. 😭

πŸ’€ ERRORS

  • EINVAL β€” mode is not PR_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 but PR_TIMING_TIMESTAMP is not currently implemented. So if you try to set that mode, you will get the error EINVAL. 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
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms