diff options
author | swhite <swhite@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2004-08-12 09:42:49 +0000 |
---|---|---|
committer | swhite <swhite@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2004-08-12 09:42:49 +0000 |
commit | e5ee137768e7eede064dcf150346f0a0cf099fad (patch) | |
tree | 2552105543c8291276a8469ac9837d3f023065fa /src/include | |
parent | afeaf4703809ae98e4ae3da4095f321ef312bd93 (diff) |
Functions completing the Cactus Timer API.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3828 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/cctk_Timers.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/include/cctk_Timers.h b/src/include/cctk_Timers.h index 7105799e..764e2c6d 100644 --- a/src/include/cctk_Timers.h +++ b/src/include/cctk_Timers.h @@ -15,7 +15,9 @@ typedef enum {val_none, val_int, val_long, val_double} cTimerValType; -typedef struct +typedef struct cTimerValTAG cTimerVal; + +typedef struct cTimerValTAG { cTimerValType type; const char *heading; @@ -26,7 +28,9 @@ typedef struct long int l; double d; } val; -} cTimerVal; + double seconds; + double resolution; +} cTimerValPLACEHOLDER; typedef struct { @@ -46,6 +50,7 @@ typedef struct void (*reset)(int, void *); void (*get)(int, void *, cTimerVal *); void (*set)(int, void *, cTimerVal *); + double (*seconds)(int, void *, cTimerVal *); } cClockFuncs; @@ -81,6 +86,13 @@ int CCTK_TimerDestroyData(cTimerData *info); int CCTK_TimerPrintData (const char *ntimer, const char *nclock); int CCTK_TimerPrintDataI(int this_timer, int this_clock); +/* Clock value routines */ +unsigned int CCTK_NumTimerClocks(const cTimerData *info); +const cTimerVal * CCTK_GetClockValueI(int valno, const cTimerData *info); +const cTimerVal * CCTK_GetClockValue(const char * name, const cTimerData *info); +double CCTK_TimerClockSeconds(const cTimerVal *clockVal); +double CCTK_TimerClockResolution(const cTimerVal *clockVal); +const char * CCTK_TimerClockName(const cTimerVal *clockVal); #ifdef __cplusplus } #endif |