X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMDS%2Fchrono.hxx;h=6ab049b3904ada958633cae30d8322eb820b1d16;hp=ec417b0c8d0bec7271fd69ebf08d4273bbe3486d;hb=499f29d24922cec66e41b41a0039a954993bc6df;hpb=b0a908c0d20341651771d0249fb10882f54b2aad diff --git a/src/SMDS/chrono.hxx b/src/SMDS/chrono.hxx index ec417b0c8..6ab049b39 100644 --- a/src/SMDS/chrono.hxx +++ b/src/SMDS/chrono.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2006-2014 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2006-2022 CEA/DEN, EDF R&D, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -27,6 +27,8 @@ #include #include +namespace SMDS +{ typedef struct acnt { char* _ctrNames; @@ -46,28 +48,30 @@ protected: static int _nbChrono; }; -class SMDS_EXPORT chrono +class SMDS_EXPORT salome_chrono { public: - chrono(int i); - ~chrono(); + salome_chrono(int i); + ~salome_chrono(); void stop(); protected: bool _run; int _ctr; clock_t _start, _end; }; - +} #ifdef CHRONODEF -#define CHRONO(i) counters::_ctrs[i]._ctrNames = (char *)__FILE__; \ +#define CHRONO(i) + using namespace SMDS; \ + counters::_ctrs[i]._ctrNames = (char *)__FILE__; \ counters::_ctrs[i]._ctrLines = __LINE__; \ - chrono aChrono##i(i); + salome_chrono aChrono##i(i); #define CHRONOSTOP(i) aChrono##i.stop(); #else // CHRONODEF -#define CHRONO(i) +#define CHRONO(i) using namespace SMDS; #define CHRONOSTOP(i) #endif // CHRONODEF