ITIMERFIX(9)

πŸ“¦ version 11.0, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so bestie, welcome to the itimerfix(9) kernel developer's manual page β€” yes, that's the manual name, we're folding it in right here. This one is all about itimerfix β€” check that a timeval value is valid, and correct πŸ’…

✨ SYNOPSIS ✨

#include <sys/time.h>

int
itimerfix(struct timeval *tv);

πŸ¦‹ DESCRIPTION πŸ¦‹

itimerfix is the little vibe check for your struct timeval *tv. It checks that the value in tv is valid β€” specifically, it wants 0 ≀ tv->tv_sec && 0 ≀ tv->tv_usec < 1000000 β€” and it also checks that the total time represented is at least one tick, or zero. no cap, that's the whole check 🫢

And if the total represented time is nonzero but smaller than a tick? Then it gets adjusted to exactly one tick. slay, corrected ✨

πŸŽ€ RETURN VALUES πŸŽ€

  • 0 β€” success, we love to see it πŸ’–
  • EINVAL β€” returned if tv is invalid πŸ™ˆ

🌈 SEE ALSO 🌈


πŸ’Œ source/version + date sign-off: Debian, dated November 23, 2001 β€” xoxo, stay valid, bestie πŸ’…

πŸ“¦ where this page comes from