put_timespec64(9)
β¨ put_timespec64 β¨
okay so bestie, we're in the put_timespec64(9) part of the Kernel API Manual and honestly this one is a little superstar π β it's the girl that takes your kernel-side time value and yeets it out to userspace in the format userspace actually asked for. no cap.
π NAME π
put_timespec64 β convert a timespec64 value into __kernel_timespec format and copy the latter to userspace π«Ά
π SYNOPSIS π
int put_timespec64 (const struct timespec64 *ts , struct
__kernel_timespec __user *uts );
πΈ ARGUMENTS πΈ
tsβ the inputstruct timespec64, i.e. the time value coming in. literally the source of truth πutsβ the user'sstruct __kernel_timespec, i.e. where it's headed. that's the destination, the whole point, the main character of this function π
β RETURN β
0 on success, or a negative errno on error π β so like, check it, bestie. don't just assume it slayed.
fr fr, a negative errno means something went wrong, and the original page says exactly that and nothing more, so we're not gonna invent drama about which error. nope π
π¦ SEE ALSO π¦
the Kernel file ./kernel/time/time.c is where this whole friend group lives, and honestly the guest list is long, so buckle up bestie:
jiffies_to_msecs(9)jiffies_to_usecs(9)mktime64(9)set_normalized_timespec64(9)ns_to_timespec64(9)__msecs_to_jiffies(9)__usecs_to_jiffies(9)timespec64_to_jiffies(9)jiffies_to_timespec64(9)jiffies_to_clock_t(9)clock_t_to_jiffies(9)jiffies_64_to_clock_t(9)nsec_to_clock_t(9)jiffies64_to_nsecs(9)jiffies64_to_msecs(9)nsecs_to_jiffies64(9)nsecs_to_jiffies(9)timespec64_add_safe(9)get_timespec64(9)get_old_timespec32(9)put_old_timespec32(9)get_itimerspec64(9)put_itimerspec64(9)get_old_itimerspec32(9)put_old_itimerspec32(9)
like, the entire time-conversion clique π and yes, get_timespec64(9) is the reverse-direction bestie β you'll see her around π
and that's the page!! π cute lil sign-off for you: this one comes from ./kernel/time, dated October 2026, and it's giving "tiny function, huge friend group" energy. periodt. π
β¨π§
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms