diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-10-20 19:39:12 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-10-20 19:39:12 +0000 |
commit | b4ed5b40f710a65cded827bcb4664e4e11061356 (patch) | |
tree | af95f98fa35bafb250a5c13429216fd4cc179d31 /src/util/CactusTimers.c | |
parent | 78328da62d78e81be8e7147fa26e6f30545cce2a (diff) |
Some new timer stuff. Compiles and links under linux and NT, but
untested as yet. Still need to put in MPI time and the windows time
stuff, as well as hardware counters, and still need to wrap schedule stuff
with timers.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1074 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/util/CactusTimers.c')
-rw-r--r-- | src/util/CactusTimers.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/util/CactusTimers.c b/src/util/CactusTimers.c index c50f7256..5ba8d47b 100644 --- a/src/util/CactusTimers.c +++ b/src/util/CactusTimers.c @@ -42,18 +42,6 @@ void CactusResetTimer(cTimer *timer) { } - -typedef struct -{ - void *(*create)(int); - void (*destroy)(int, void *); - void (*start)(int, void *); - void (*stop)(int, void *); - void (*reset)(int, void *); - char *(*get)(int, void *); - void (*set)(int, void *, const char *); -} t_TimerFuncs; - typedef struct { void **data; @@ -338,7 +326,7 @@ char *CCTK_TimerGet(const char *name) t_TimerFuncs *funcs; int this_timer; int handle; - char *this_val; + char this_val[100]; char *retval; char *temp; int retlength; @@ -355,7 +343,7 @@ char *CCTK_TimerGet(const char *name) for(handle = 0; handle < n_timertypes; handle++) { funcs = (t_TimerFuncs *)Util_GetHandledData(handles, handle); - this_val = funcs->get(this_timer, timer->data[handle]); + sprintf(this_val, "%lf", funcs->get(this_timer, timer->data[handle])); retlength += 2+strlen(this_val); temp = realloc(retval, retlength); if(temp) |