FUNCTION::CPU_CLOCK_(3stap)

✨ FUNCTION::CPU_CLOCK_(3stap) ✨

okay bestie, welcome to the Timestamp Functions corner of the 3stap manual πŸ’– this one's a lil baby page but it's lowkey iconic, so let's get into it πŸŽ€


🌸 NAME 🌸

function::cpu_clock_ns β€” the number of nanoseconds on the given cpu's clock πŸ•°οΈβœ¨


πŸ¦‹ SYNOPSIS πŸ¦‹

cpu_clock_ns:long(cpu:long)

πŸ’… ARGUMENTS πŸ’…

  • cpu β€” which processor's clock we're reading, bestie. just tell it which one πŸ‘‘

🌈 DESCRIPTION 🌈

so this function returns the number of nanoseconds on the clock of the cpu you handed it. that's the whole vibe πŸ’«

and here's the tea: it's always monotonic when you're comparing on the same cpu β€” like, it never goes backwards on you, no cap 🫢 but between different cpus? there may be some drift (within about a jiffy) πŸ™ˆ so don't go comparing clocks across cpus and acting surprised, iykyk 😭


πŸ‘‘ SEE ALSO πŸ‘‘

tapset::timestamp_monotonic(3stap)


not me finishing a whole manpage in one sitting πŸ’€ go read the tapset one next, fr fr 🌸

mwah πŸ’‹ this was the SystemTap Tapset Reference, version Ver, dated September 2026 β€” stan a timestamp function, periodt ✨

πŸ“¦ where this page comes from