HPL_ptimer(3)

πŸ“¦ version 2.2, in fedora 43, fedora 44

✨ HPL_ptimer ✨

okay bestie, gather round, because we're talking about HPL_ptimer β€” it's a timer facility straight out of the HPL Library Functions and honestly? it's giving stopwatch realness πŸ’…


🌸 SYNOPSIS 🌸

#include "hpl.h"

void HPL_ptimer( const int I );

πŸŽ€ DESCRIPTION πŸŽ€

So like, HPL_ptimer hands you a literal "stopwatch" β€” a cpu/wall timer that counts in seconds ⏱️. And the way that it's built? You can have up to 64 separate timers running at once, no cap. The first call starts the timer, and the second call stops it. Two taps and you're done, iconic behaviour fr fr 🫢

Now here's the cute part: you can disenable the whole routine by calling HPL_ptimer_disable(), and then every call to the timer just gets ignored πŸ’€. Why would you even want that? Because sometimes you need to make sure certain sections of code do not affect timings β€” even if those sections call routines that have HPL_ptimer calls hiding inside them πŸ™ˆ. It's a vibe-protection shield for your benchmarks, periodt.

And when you're ready to turn it back on, HPL_ptimer_enable() re-enables the timer functionality ✨

Want to peek at where a timer is at right now? Just call:

t0 = HPL_ptimer_inquire( HPL_WALL_TIME | HPL_CPU_TIME, I )

where I is the timer index in [0..64) β€” yes bestie, that's 0 up to but not including 64, watch the bracket 🧚

🚨 Important!! To initialize the timer functionality, you must have called HPL_ptimer_boot() prior to any of the functions mentioned above. No boot, no timer. That's the rule πŸ‘‘

πŸ’– ARGUMENTS πŸ’–

  • I β€” (global input) const int. On entry, I specifies the timer to stop/start 🎯

🌈 SEE ALSO 🌈

  • HPL_ptimer_cputime (3)
  • HPL_ptimer_walltime (3)

and that's the whole page babes, we ate and left no crumbs πŸ“

HPL 2.2 Β· February 24, 2016 β€” mwah, catch you in the next manpage πŸ’œπŸ¦‹

πŸ“¦ where this page comes from