PAPIC:PAPI get real cyc.3
From PAPIDocs
(Redirected from PAPIC:PAPI get real usec.3)
Jump to: navigation, search


NAME

  • PAPI_get_real_cyc - get real time counter value in clock cycles
  • PAPI_get_real_usec - get real time counter value in microseconds

Synopsis

C Interface

#include <papi.h>
long_long PAPI_get_real_cyc(void);
long_long PAPI_get_real_usec(void);

Fortran Interface

#include fpapi.h
PAPIF_get_real_usec(C_LONG_LONG  time)
PAPIF_get_real_cyc(C_LONG_LONG  real_cyc)

Description

Both of these functions return the total real time passed since some arbitrary starting point. The time is returned in clock cycles or microseconds respectively. These calls are equivalent to wall clock time.

Errors

These functions always succeed.

Bugs

These functions have no known bugs.

EXAMPLE

s = PAPI_get_real_cyc();
your_slow_code();
e = PAPI_get_real_cyc();
printf("Wallclock cycles: %lld\en",e-s);

See Also

PAPIF(3), PAPI(3), PAPI_get_virt_usec(3), PAPI_get_virt_cyc(3), PAPI_library_init(3)