proc_dointvec_ms_jiffies(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 proc_dointvec_ms_jiffies(9) 🌸

okay so bestie, this one's from the Kernel API Manual and it's honestly kind of a little legend β€” it's the sysctl handler that reads your integers as milliseconds and quietly does the jiffies math for you. lowkey iconic. πŸ’…


✨ NAME ✨

proc_dointvec_ms_jiffies β€” read a vector of integers as 1 milliseconds πŸ•°οΈ


πŸ¦‹ SYNOPSIS πŸ¦‹

int proc_dointvec_ms_jiffies (const struct ctl_table *table , int dir ,
void *buffer , size_t *lenp , loff_t *ppos );

like, that's the whole signature, no cap ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • table β€” the sysctl table, bestie. it's the whole vibe container 🫢
  • dir β€” TRUE if this is a write to the sysctl file. so like, are we writing or are we reading πŸ‘€
  • buffer β€” the user buffer. the actual data lives here πŸ’–
  • lenp β€” the size of the user buffer πŸ“
  • ppos β€” the current position in the file. where are we in the story rn πŸ“–

πŸ’œ DESCRIPTION πŸ’œ

okay so here's what it actually does β€” it reads/writes up to table->maxlen/sizeof(unsigned int) integer values from/to the user buffer, and the whole thing is treated as an ASCII string. periodt. πŸŽ€

and then the cute part: the values read are assumed to be in 1/1000 seconds, and are converted into jiffies. so you hand it milliseconds, it gives you jiffies, everybody slays. πŸ”₯

returns 0 on success. that's it, that's the win ✨

ngl the msβ†’jiffies conversion is the entire main character energy of this function, so don't sleep on it πŸ’…

🌈 SEE ALSO 🌈


and that's the tea, bestie πŸ“ this page lives in ./kernel/time, dated October 2026 β€” mwah, go forth and convert your milliseconds πŸ§šπŸ’–β­

πŸ“¦ where this page comes from