diff options
author | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-12-29 19:45:57 +0000 |
---|---|---|
committer | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-12-29 19:45:57 +0000 |
commit | 675a06688d5c2b260375208efa16bcc19f3dd651 (patch) | |
tree | 37b8c5b888380dbe12dd01e7a04f96a940cb2b4b /src/include/cctk_Timers.h | |
parent | 5de9d4c550bbd369d9237978edc771cf0a3e2c10 (diff) |
Changed CCTK_TimerPrintData and CCTK_TimerPrintDataI to take two arguements,
so you can choose both a timer and a clock to print. Passing a NULL argument for a string, or a -1 for the index versions will cause all the timers/clocks to
be used.
Also added new functions
CCTK_NumClocks
CCTK_ClockName
CCTK_ClockHandle
which I needed for this. Not sure that I really needed the ClockHandle
one, but it is useful anyway to test if a clock is registered.
Maybe these functions should also take something like a file descriptor,
so that the information can be easily printed to a file, or to the HTTPD
pages.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2547 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/include/cctk_Timers.h')
-rw-r--r-- | src/include/cctk_Timers.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/include/cctk_Timers.h b/src/include/cctk_Timers.h index 83dce925..7105799e 100644 --- a/src/include/cctk_Timers.h +++ b/src/include/cctk_Timers.h @@ -37,6 +37,7 @@ typedef struct typedef struct { + const char *name; int n_vals; void *(*create)(int); void (*destroy)(int, void *); @@ -57,7 +58,10 @@ extern "C" { int CCTK_ClockRegister(const char *name, const cClockFuncs *functions); int CCTK_NumTimers (void); +int CCTK_NumClocks (void); const char *CCTK_TimerName (int timer_handle); +const char *CCTK_ClockName (int clock_handle); +int CCTK_ClockHandle(const char *nclock); int CCTK_TimerCreate(const char *name); int CCTK_TimerCreateI(void); int CCTK_TimerDestroy(const char *name); @@ -74,8 +78,8 @@ int CCTK_TimerI(int this_timer, cTimerData *info); cTimerData *CCTK_TimerCreateData(void); int CCTK_TimerDestroyData(cTimerData *info); -int CCTK_TimerPrintData (const char *name); -int CCTK_TimerPrintDataI(int this_timer); +int CCTK_TimerPrintData (const char *ntimer, const char *nclock); +int CCTK_TimerPrintDataI(int this_timer, int this_clock); #ifdef __cplusplus } |