1 /*=========================================================================
2 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
5 - University of LYON http://www.universite-lyon.fr/
6 - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr
7 - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the copyright notices for more information.
13 It is distributed under dual licence
15 - BSD See included LICENSE.txt file
16 - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ======================================================================-====*/
21 ===================================================================
23 * @author David Sarrut <David.Sarrut@creatis.insa-lyon.fr>
24 * @date 18 Jul 2007 16:26:08
28 ===================================================================*/
30 #include "clitkCommon.h"
32 #if defined(unix) || defined(__APPLE__)
33 # include <sys/time.h>
34 # include <sys/resource.h>
46 //====================================================================
49 void Stop(bool accumulate=true);
51 void Print(std::ostream & os=std::cout) const;
52 void Print(std::string text, std::ostream & os=std::cout) const;
53 //====================================================================
55 //====================================================================
56 long double GetTimeInMicroSecond() const { return mElapsed; }
57 long double GetMeanTimeInMicroSecond() const { return mElapsed/mNumberOfCall; }
58 long int GetNumberOfCall() const { return mNumberOfCall; }
59 //====================================================================
62 #if defined(unix) || defined(__APPLE__)
66 unsigned __int64 mBegin;
67 unsigned __int64 mEnd;
68 unsigned __int64 mFrequency;
71 long int mNumberOfCall;
77 #endif /* end #define CLITKTIMER_H */