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
- Copyright 2020, 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