time_t(3type)

πŸ’– time_t(3type) β€” bestie, let's talk about time πŸ’–

okay so this whole page lives in section 3type of the manual, and it's your girl's guide to the three little integer types that hold time πŸ‘‘ no cap.


✨ NAME ✨

time_t, suseconds_t, useconds_t β€” the integer time squad πŸ•°οΈ

πŸ“š LIBRARY πŸ“š

Standard C library (libc) β€” the classic, the icon, the one you already have πŸ’…

🧚 SYNOPSIS 🧚

#include <time.h>

typedef /* ... */  time_t;

#include <sys/types.h>

typedef /* ... */  suseconds_t;
typedef /* ... */  useconds_t;

🌸 DESCRIPTION 🌸

so here's the lineup, one by one:

  • time_t β€” this one holds time in seconds. per POSIX it's an integer type of at least 64 bits ⏳
  • suseconds_t β€” this one holds time in microseconds. it's a signed integer type, and it can store values at least in the range [-1, 1000000] 🫢
  • useconds_t β€” also time in microseconds, but this one is unsigned, and it can store values at least in the range [0, 1000000] ✨

πŸŽ€ STANDARDS πŸŽ€

  • time_t β€” C11, POSIX.1-2024. certified βœ…
  • suseconds_t β€” POSIX.1-2024. also certified βœ…
  • useconds_t β€” None. not certified at all, it's giving ✨mystery✨

πŸ¦‹ HISTORY πŸ¦‹

  • time_t β€” C89, POSIX.1-1988. she's been here since forever, a true OG πŸ‘‘
  • suseconds_t β€” SUSv2, POSIX.1-2001 XSI, POSIX.1-2024.
  • useconds_t β€” SUSv1, POSIX.1-2001 XSI. Removed in POSIX.1-2008 πŸ’€ rip bestie

🌈 Header files 🌈

<sched.h> defines time_t since POSIX.1-2008. that's the lore 🫢

⏰ time_t ⏰

POSIX.1-2024 requires that the width of time_t is at least 64 bits β€” but some systems are still out here using 32 bits by default 😭 not the 2038 vibe, bestie.

πŸ’… NOTES πŸ’…

On some architectures, the width of time_t can be controlled with the feature test macro _TIME_BITS. go see feature_test_macros(7) if you want the tea πŸ“

the following headers also provide time_t: <sched.h>, <sys/msg.h>, <sys/select.h>, <sys/sem.h>, <sys/shm.h>, <sys/stat.h>, <sys/time.h>, <sys/types.h>, and <utime.h>. it's everywhere, she gets around πŸ’–

the following headers also provide suseconds_t: <sys/select.h> and <sys/time.h>.

the following headers also provided useconds_t: <unistd.h>. note the past tense β€” provided πŸ™ˆ

πŸ‘€ SEE ALSO πŸ‘€

stime(2), time(2), ctime(3), difftime(3), usleep(3), timeval(3type)


and that's the whole page, bestie!! 🌟 this came from Linux man-pages 6.20, dated 2026-02-08, on the time_t(3type) page. go forth and store your seconds correctly πŸ’œβœ¨ periodt.

πŸ“¦ 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