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://www.centreleonberard.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 //#include "clitkCommon.h"
23 #if defined(unix) || defined(__APPLE__)
24 # include <sys/time.h>
25 # include <sys/resource.h>
37 //====================================================================
40 void Stop(bool accumulate=true);
42 void Print(std::ostream & os=std::cout) const;
43 void Print(std::string text, std::ostream & os=std::cout) const;
44 //====================================================================
46 //====================================================================
47 long double GetTimeInMicroSecond() const { return mElapsed; }
48 long double GetMeanTimeInMicroSecond() const { return mElapsed/mNumberOfCall; }
49 long int GetNumberOfCall() const { return mNumberOfCall; }
50 //====================================================================
53 #if defined(unix) || defined(__APPLE__)
57 unsigned __int64 mBegin;
58 unsigned __int64 mEnd;
59 unsigned __int64 mFrequency;
62 long int mNumberOfCall;
68 #endif /* end #define CLITKTIMER_H */