Next: How to Insert Timers
Up: Using Cactus Timers
Previous: What are Timers?
Contents
Many of the timing calls come in two versions, one whose name ends with
the letter I, and one without. The calls whose names end with the
letter I refer to the timer or clock by index, which is a
non-negative int value; the other calls refer to a timer by name.
If a timer is created without a name, it can be referred to only by its index,
otherwise, it can be referred to by name or by index.
Typically, a negative return value from a timer function indicates an error.
- CCTK_TimerCreate, CCTK_TimerCreateI
Create a timer with a given name, or with no name (respectively)
and return a timer index or an error code.
Negative return values indicate errors.
Only one timer with a given name can exist at any given time.
- CCTK_TimerDestroy, CCTK_TimerDestroyI
Reclaim resources used by a timer.
- CCTK_TimerStart, CCTK_TimerStartI
Start the given timer, using all registered clocks.
- CCTK_TimerStop, CCTK_TimerStopI
Stop the given timer on all registered clocks.
- CCTK_TimerReset, CCTK_TimerResetI
Reset the given timer on all registered clocks.
- CCTK_TimerCreateData, CCTK_TimerDestroyData
Allocate and reclaim (respectively) resources for a cTimerData structure,
which will be used to hold clock values.
- CCTK_Timer, CCTK_TimerI
Fill the given cTimerData structure with clock values as of
the last call to CCTK_TimerStop.
- CCTK_NumTimers
Return the number of created timers
- CCTK_TimerName
Return the name of the timer for a given timer index (or NULL if
the timer is unnamed or any other error occurs).
- CCTK_NumTimerClocks
Take a pointer to cTimerData and return the number of clocks
recorded in a timer measurement
- CCTK_GetClockValue, CCTK_GetClockValueI
Given a clock referred to by name or index, respectively, and a
cTimerData pointer, return a cTimerVal pointer representing
the value of the clock when the timer was stopped
- CCTK_TimerClockName
Return the name of the clock given by the cTimerVal pointer argument.
- CCTK_TimerClockResolution
Return the floating-point value of the resolution in seconds
of the clock referred to by the cTimerVal pointer argument.
This is a lower bound for the smallest non-zero difference in values
between calls of CCTK_TimerClockSeconds.
- CCTK_TimerClockSeconds
Return the floating-point value of the measurement in seconds
from the cTimerVal pointer argument.
Next: How to Insert Timers
Up: Using Cactus Timers
Previous: What are Timers?
Contents
|