HPL_timer(3)

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

πŸ’– HPL_timer(3) β€” the HPL Library Functions glow-up πŸ’–

okay bestie, we're in the HPL library function docs and this one is literally called HPL_timer. she's the timer facility. she counts seconds. she's the stopwatch of the group chat. πŸŽ€


✨ NAME ✨

HPL_timer β€” the timer facility, aka the group chat's official stopwatch πŸ•°οΈβœ¨


🌸 SYNOPSIS 🌸

#include "hpl.h"

void HPL_timer( const int I );

πŸ¦‹ DESCRIPTION πŸ¦‹

so HPL_timer gives you a "stopwatch" vibe β€” it's a cpu/wall timer that measures in seconds. no cap. πŸ’…

up to 64 separate timers can be functioning at once, which is giving "she's booked and busy". πŸ‘‘

how it works, bestie: the first call starts the timer, and the second call stops it. that's it. that's the whole thing. iconic.

and listen β€” this routine can be disenabled by calling HPL_timer_disable(), so that calls to the timer are just... ignored. πŸ«₯ why would you do that? because this feature lets you make sure certain sections of code do not affect timings, even if they call routines which have HPL_timer calls in them. sneaky but valid. then HPL_timer_enable() will re-enable the timer functionality. the comeback era. πŸ”₯

you can retrieve the current value of a timer by calling

t0 = HPL_timer_inquire( HPL_WALL_TIME | HPL_CPU_TIME, I )

where I is the timer index in [0..64). ⚠️ note that range, bestie β€” it's [0..64), not [0..64], okurrr.

and to initialize the timer functionality, one must have called HPL_timer_boot() prior to any of the functions mentioned above. no boot, no timers, fr fr. πŸ™ˆ


πŸŽ€ ARGUMENTS πŸŽ€

  • I β€” (global input) const int. on entry, I specifies the timer to stop/start. that's the whole job. slay. πŸ’–

🌈 SEE ALSO 🌈

  • HPL_timer_cputime (3)
  • HPL_timer_walltime (3)

this page is from HPL 2.2, dated February 24, 2016 β€” a whole vintage, and she's still serving. πŸ’œβœ¨ thanks for reading bestie, go start a timer or something, mwah 🫢

πŸ“¦ where this page comes from