diff --git a/include/openmc/timer.h b/include/openmc/timer.h index 8fbcee46b4..ac8c81e0ce 100644 --- a/include/openmc/timer.h +++ b/include/openmc/timer.h @@ -37,7 +37,7 @@ public: Timer() {}; //! Start running the timer - void start (); + void start(); //! Get total elapsed time in seconds //! \return Elapsed time in [s] @@ -52,7 +52,7 @@ public: private: bool running_ {false}; //!< is timer running? std::chrono::time_point start_; //!< starting point for clock - double elapsed_ {0.0}; //!< elasped time in [s] + double elapsed_ {0.0}; //!< elapsed time in [s] }; //============================================================================== diff --git a/src/finalize.cpp b/src/finalize.cpp index 5885470c15..84b68e82e4 100644 --- a/src/finalize.cpp +++ b/src/finalize.cpp @@ -23,6 +23,10 @@ int openmc_finalize() // Clear results openmc_reset(); + // Reset timers + reset_timers(); + reset_timers_f(); + // Reset global variables settings::assume_separate = false; settings::check_overlaps = false; @@ -115,10 +119,6 @@ int openmc_reset() simulation::k_abs_tra = 0.0; simulation::k_sum = {0.0, 0.0}; - // Reset timers - reset_timers(); - reset_timers_f(); - return 0; } @@ -126,6 +126,8 @@ int openmc_hard_reset() { // Reset all tallies and timers openmc_reset(); + reset_timers(); + reset_timers_f(); // Reset total generations and keff guess simulation::keff = 1.0;