vpGetTimer(3) | Library Functions Manual | vpGetTimer(3) |
vpGetTimer, vpClearTimer - interval timer facility
#include <volpack.h>
vpResult
vpGetTimer(vpc, option, iptr)
vpResult
vpClearTimer(vpc, option)
These functions are used for measuring the performance of the VolPack library. To use them, the library must be compiled with a special flag: either -DHAVE_LORES_TIMER (for machine that support the gettimeofday C library call) or -DHAVE_HIRES_TIMER (for SGI machines that support high-resolution memory-mapped I/O timers; on a Challenge or ONYX, the -DHAVE_64BIT_TIMER must also be specified). If one of these flags is specified at compile time then VolPack maintains a table recording the accumulated time spent in various operations. Note that some of the operations can only be timed with a high-resolution timer; time values will not be recorded and will appear to be zero if a low resolution timer is specified at compile time.
vpGetTimer retrieves the accumulated time for a particular operation. The option argument specifies which operation:
The routine stores the accumulated time since the last call to vpClearTimer (or since the beginning of the program) in the location specified by iptr. The units of the value are microseconds.
vpClearTimer sets the specified timer value back to zero.
The normal return value is VP_OK. The following error return value is possible:
VolPack |