timeval(3type)
β¨ timeval β bestie's guide to time in seconds and microseconds β¨
okay so you're here because you met timeval and you're like "what is this little struct doing in my life" β don't worry, I got you. this is timeval(3type), a type page from the man pages, and honestly? she's an icon. let's go π
πΈ NAME πΈ
timeval β time, but make it seconds and microseconds π
π LIBRARY π
Standard C library (libc) β the classic, the blueprint, the main character π«Ά
β¨ SYNOPSIS β¨
#include <sys/time.h>
struct timeval {
time_t tv_sec; /* Seconds */
suseconds_t tv_usec; /* Microseconds */
};
like. look at her. two fields, zero drama, maximum usefulness π
π DESCRIPTION π
She describes times in seconds and microseconds. that's it. that's the whole vibe. tv_sec holds your seconds, tv_usec holds your microseconds, and together they're giving extremely precise time energy β±οΈβ¨
π STANDARDS π
POSIX.1-2024. β yes bestie, she's standardized, she's official, she's certified π
π¦ HISTORY π¦
SUSv1, POSIX.1-2001. β she's been around. she's seen things. lowkey a legend at this point π
π NOTES π
heads up, these other headers also hand you this type, no cap:
<sys/resource.h><sys/select.h><utmpx.h>
so if you're already including one of those, surprise, you got timeval for free π
π SEE ALSO π
gettimeofday(2)select(2)utimes(2)adjtime(3)futimes(3)timeradd(3)suseconds_t(3type)time_t(3type)timespec(3type)
go read them, they're all part of the same little friend group π«Ά
fr fr: this is the Linux man-pages version6.20, dated2026-02-08. go off bestie, you understood the whole page, 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