summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoreschnett <eschnett@17b73243-c579-4c4c-a9d2-2d5706c11dac>2013-01-14 17:45:38 +0000
committereschnett <eschnett@17b73243-c579-4c4c-a9d2-2d5706c11dac>2013-01-14 17:45:38 +0000
commitc327320609f6018c1821d7f6b4a1c00059a47fb6 (patch)
treec42290c1d627603a3f9c7c4cb6ca627cdec9b2a4 /src
parent89602bea2d859320b5b4547b00524a04903e7da2 (diff)
Correct and beautify timer output
Output "seconds" instead of the actual timer value, in accordance with the column headers. Do not indent output. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4933 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src')
-rw-r--r--src/main/ScheduleInterface.c32
1 files changed, 3 insertions, 29 deletions
diff --git a/src/main/ScheduleInterface.c b/src/main/ScheduleInterface.c
index d8a02f35..f58cd1fb 100644
--- a/src/main/ScheduleInterface.c
+++ b/src/main/ScheduleInterface.c
@@ -3119,11 +3119,6 @@ static void CCTKi_SchedulePrintTimerInfo(cTimerData *timer,
int i, j;
- if (indent_level > 0)
- {
- fprintf (file, "%*s", indent_level, " ");
- }
-
/* print delimiter line */
if (*where == 0)
{
@@ -3138,31 +3133,10 @@ static void CCTKi_SchedulePrintTimerInfo(cTimerData *timer,
{
j = strlen (timer->vals[i].heading) + strlen (timer->vals[i].units) + 3;
- switch (timer->vals[i].type)
+ fprintf (file, "| %*.8f ", j, timer->vals[i].seconds);
+ if (total_time)
{
- case val_int:
- fprintf (file, "| %*d ", j, timer->vals[i].val.i);
- if (total_time)
- {
- total_time->vals[i].val.i += timer->vals[i].val.i;
- }
- break;
- case val_long:
- fprintf (file, "| %*ld ", j, timer->vals[i].val.l);
- if (total_time)
- {
- total_time->vals[i].val.l += timer->vals[i].val.l;
- }
- break;
- case val_double:
- fprintf (file, "| %*.8f ", j, timer->vals[i].val.d);
- if (total_time)
- {
- total_time->vals[i].val.d += timer->vals[i].val.d;
- }
- break;
- default:
- fprintf (file, "Unknown value type at line %d of %s\n", __LINE__, __FILE__);
+ total_time->vals[i].seconds += timer->vals[i].seconds;
}
}