NAME

PAPI_get_real_cyc, PAPI_get_real_usec - get real time counter values

CONTENTS

Synopsis
Description
Errors
Example
Author
Bugs
See Also

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.

EXAMPLE


long_long s, e;
        
if (PAPI_library_init(PAPI_VER_CURRENT) != PAPI_VER_CURRENT)
  exit(1);

s = PAPI_get_real_cyc();

your_slow_code();

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

AUTHOR

The PAPI Team. See them at the PAPI Web Site: http://icl.cs.utk.edu/projects/papi

BUGS

These functions have no known bugs.

SEE ALSO

PAPI_library_init (3), PAPI_get_virt_usec (3), PAPI_get_virt_cyc (3)


PAPI Programmer’s Reference PAPI_get_real_cyc (3) November, 2003

  Innovative Computing Laboratory
2001 R&D Winner  
Contact PAPI: papi@cs.utk.edu Computer Science Department
  University of Tennessee