From c38f9aa7c35b318338418b410d75888caa2717bd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?=
 <stepan@adjemian.eu>
Date: Mon, 6 Apr 2020 09:29:57 +0200
Subject: [PATCH] Cosmetic change.

---
 src/ModFile.cc | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/ModFile.cc b/src/ModFile.cc
index 6c6e5bfa..049ac456 100644
--- a/src/ModFile.cc
+++ b/src/ModFile.cc
@@ -909,8 +909,10 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all, bool clear_glo
   else if (clear_global)
     mOutputFile << "clear M_ options_ oo_ estim_params_ bayestopt_ dataset_ dataset_info estimation_info ys0_ ex0_;" << endl;
 
-  mOutputFile << "tic0 = tic;" << endl
-              << "% Define global variables." << endl
+  if (!notime)
+    mOutputFile << "tic0 = tic;" << endl;
+
+  mOutputFile << "% Define global variables." << endl
               << "global M_ options_ oo_ estim_params_ bayestopt_ dataset_ dataset_info estimation_info ys0_ ex0_" << endl
               << "options_ = [];" << endl
               << "M_.fname = '" << basename << "';" << endl
@@ -1098,11 +1100,11 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all, bool clear_glo
                   << "  save('" << basename << "_results.mat', 'oo_recursive_', '-append');" << endl << "end" << endl;
 
       config_file.writeEndParallel(mOutputFile);
+
       if (!notime)
-        {
           mOutputFile << endl << endl
                       << "disp(['Total computing time : ' dynsec2hms(toc(tic0)) ]);" << endl;
-        }
+
       if (!no_warn)
         {
           if (warnings.countWarnings() > 0)
-- 
GitLab