From 172c609cef493c8a99701b02c66151da7d669490 Mon Sep 17 00:00:00 2001 From: tradke Date: Tue, 14 Dec 2004 18:00:46 +0000 Subject: Check for division by 0. git-svn-id: http://svn.cactuscode.org/arrangements/CactusUtils/TimerReport/trunk@13 d0051148-8e13-4bef-be1d-f6c572c85f9f --- src/Output.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Output.c b/src/Output.c index 35b45c5..eca295d 100644 --- a/src/Output.c +++ b/src/Output.c @@ -54,22 +54,21 @@ void TimerReport_Checkpoint(CCTK_ARGUMENTS); @desc Output the timer table @enddesc - @calls @@*/ void TimerReport_Output(CCTK_ARGUMENTS) { DECLARE_CCTK_ARGUMENTS; DECLARE_CCTK_PARAMETERS; - if (next || out_at == cctk_iteration || cctk_iteration%out_every == 0) + if (next || out_at == cctk_iteration || (out_every && cctk_iteration%out_every == 0)) { CCTK_VInfo(CCTK_THORNSTRING, "Timer Report at iteration %d time %g", cctk_iteration, (double)cctk_time); CCTK_SchedulePrintTimes(NULL); - - if (next) + + if (next) { CCTK_ParameterSet("next", CCTK_THORNSTRING, "no"); } @@ -84,7 +83,6 @@ void TimerReport_Output(CCTK_ARGUMENTS) @desc Output the timer table if before_checkpoint is set @enddesc - @calls @@*/ void TimerReport_Checkpoint(CCTK_ARGUMENTS) { -- cgit v1.2.3