From c327320609f6018c1821d7f6b4a1c00059a47fb6 Mon Sep 17 00:00:00 2001 From: eschnett Date: Mon, 14 Jan 2013 17:45:38 +0000 Subject: 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 --- src/main/ScheduleInterface.c | 32 +++----------------------------- 1 file changed, 3 insertions(+), 29 deletions(-) (limited to 'src') 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; } } -- cgit v1.2.3