Salome HOME
Merge commit '6600bcec782fc8b6c72871fe6e08bd19a34a4e2b'
[modules/smesh.git] / src / SMDS / chrono.hxx
index 3572e08ecc6fe46486ab693fc551c7c0d4867de7..a29b9088d84281497b585917eb80658a7bfc38f5 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2006-2019  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2006-2023  CEA, EDF, 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 <iostream>
 #include <ctime>
 
+namespace SMDS
+{
 typedef struct acnt
 {
   char*  _ctrNames;
@@ -57,9 +59,11 @@ protected:
   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__; \
   salome_chrono aChrono##i(i);
 
@@ -67,7 +71,7 @@ protected:
 
 #else  // CHRONODEF
 
-#define CHRONO(i)
+#define CHRONO(i) using namespace SMDS;
 #define CHRONOSTOP(i)
 
 #endif // CHRONODEF