aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetIOScalar
diff options
context:
space:
mode:
Diffstat (limited to 'Carpet/CarpetIOScalar')
-rw-r--r--Carpet/CarpetIOScalar/interface.ccl1
-rw-r--r--Carpet/CarpetIOScalar/src/ioscalar.cc4
2 files changed, 5 insertions, 0 deletions
diff --git a/Carpet/CarpetIOScalar/interface.ccl b/Carpet/CarpetIOScalar/interface.ccl
index de08e9614..6fdca99b9 100644
--- a/Carpet/CarpetIOScalar/interface.ccl
+++ b/Carpet/CarpetIOScalar/interface.ccl
@@ -7,6 +7,7 @@ CCTK_REAL last_output_time TYPE=scalar
CCTK_INT this_iteration TYPE=scalar
USES INCLUDE HEADER: carpet_typecase.hh
+USES INCLUDE HEADER: CarpetTimers.hh
# function to check whether existing output files should be truncated or not
CCTK_INT FUNCTION IO_TruncateOutputFiles \
diff --git a/Carpet/CarpetIOScalar/src/ioscalar.cc b/Carpet/CarpetIOScalar/src/ioscalar.cc
index 0c28dd943..618c1ddb5 100644
--- a/Carpet/CarpetIOScalar/src/ioscalar.cc
+++ b/Carpet/CarpetIOScalar/src/ioscalar.cc
@@ -18,6 +18,7 @@
#include "CactusBase/IOUtil/src/ioutil_Utils.h"
#include "carpet.hh"
+#include "CarpetTimers.hh"
@@ -148,11 +149,14 @@ namespace CarpetIOScalar {
int
OutputGH (const cGH * const cctkGH)
{
+ static Carpet::Timer timer ("CarpetIOScalar::OutputGH");
+ timer.start();
for (int vindex=0; vindex<CCTK_NumVars(); ++vindex) {
if (TimeToOutput(cctkGH, vindex)) {
TriggerOutput(cctkGH, vindex);
}
}
+ timer.stop();
return 0;
}