PAPI_get_virt_nsec(3)

πŸ’… PAPI_get_virt_nsec(3) β€” get virtual time counter values in nanoseconds, straight from the PAPI manual, bestie ✨

πŸ’– NAME πŸ’–

PAPI_get_virt_nsec β€” Get virtual time counter values in nanoseconds.


✨ SYNOPSIS ✨

The synopsis here is giving short-and-sweet energy β€” it rolls right into the detailed description, so let’s go. 🫢

πŸ¦‹ Detailed Description πŸ¦‹

Okay so this function returns the total number of virtual units from some arbitrary starting point. Virtual units accrue every time the process is running in user-mode on behalf of the process. Like the real time counters, this count is guaranteed to exist on every platform PAPI supports. However, on some platforms, the resolution can be as bad as 1/Hz as defined by the operating system. 😭

🩷 Return values 🩷

Here’s the tea on the return values, no cap:

  • PAPI_ECNFLCT β€” If there is no master event set. This will happen if the library has not been initialized, or for threaded applications, if there has been no thread id function defined by the PAPI_thread_init function.
  • PAPI_ENOMEM β€” For threaded applications, if there has not yet been any thread specific master event created for the current thread, and if the allocation of such an event set fails, the call will return PAPI_ENOMEM or PAPI_ESYS.
vibe check: those return values are literally the whole β€œwhat went wrong” section, so keep them close. πŸ’…

πŸ‘‘ Author πŸ‘‘

This page was generated automatically by Doxygen for PAPI from the source code β€” yes, the robots did this one, bestie. πŸ€–βœ¨


mwah πŸ’‹ β€” this page is serving PAPI version 7.2.0.0, dated Wed Jun 25 2025 19:30:48. Byeee! πŸŽ€πŸ¦‹πŸ’–