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 πŸ‘€

go read them, they're all part of the same little friend group 🫢


fr fr: this is the Linux man-pages version 6.20, dated 2026-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
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms