From d60338459d262bf1ff86698f38db458cae9793c8 Mon Sep 17 00:00:00 2001
From: Giovanni Bussi <giovanni.bussi@gmail.com>
Date: Wed, 12 Apr 2017 16:28:31 +0200
Subject: [PATCH] Added timer to sum_hills

It is difficult to remove the main timer, but at least I
added a timer that makes sense

Fixes #194
---
 src/function/FuncSumHills.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/function/FuncSumHills.cpp b/src/function/FuncSumHills.cpp
index 21843d181..f8724d47b 100644
--- a/src/function/FuncSumHills.cpp
+++ b/src/function/FuncSumHills.cpp
@@ -26,6 +26,7 @@
 #include "tools/BiasRepresentation.h"
 #include "tools/File.h"
 #include "tools/Tools.h"
+#include "tools/Stopwatch.h"
 #include <iostream>
 
 using namespace std;
@@ -507,6 +508,10 @@ historep(NULL)
     if(integratehills)	hillsHandler=new FilesHandler(hillsFiles,parallelread,*this, log);
     if(integratehisto)	histoHandler=new FilesHandler(histoFiles,parallelread,*this, log);
 
+    Stopwatch sw;
+
+    sw.start("0 Summing hills");
+
     // read a number of hills and put in the bias representation
     int nfiles=0;
     bool ibias=integratehills; bool ihisto=integratehisto;
@@ -619,6 +624,10 @@ historep(NULL)
     if(hillsHandler) delete hillsHandler;
     if(histoHandler) delete histoHandler;
 
+    sw.stop("0 Summing hills");
+
+    log<<sw;
+
     return;
   } 
   // just an initialization but you need to do something on the fly?: need to connect with a metad run and its grid representation 
-- 
GitLab