HPL_ptimer(3)
β¨ 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,Ispecifies 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
- fedora 43: hpl-doc 2.2-22.fc43 Β· LicenseRef-Callaway-BSD-with-advertising
- fedora 44: hpl-doc 2.2-23.fc44 Β· LicenseRef-Callaway-BSD-with-advertising
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms