]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Replace deprecated function time.clock.
authorOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Thu, 26 Jan 2023 10:13:22 +0000 (11:13 +0100)
committerOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Thu, 26 Jan 2023 10:13:22 +0000 (11:13 +0100)
src/Container/SALOME_ComponentPy.py

index b426f724af5027ed36248fbcfd7b91cb70685a77..349a696f8856cb0fbd99520c56d1dee2d1d0f318 100644 (file)
@@ -255,7 +255,7 @@ class SALOME_ComponentPy_Gen_i (Engines__POA.EngineComponent):
     def CpuUsed_impl(self):
         if ( self._ThreadId | self._Executed ) :
             if self._ThreadId == get_ident() :
-                cpu = time.clock()
+                cpu = time.process_time()
                 self._ThreadCpuUsed = cpu - self._StartUsed
                 MESSAGE( "SALOME_ComponentPy_i::CpuUsed_impl " + self._serviceName + " " + str( int(cpu) ) + " - " + str( self._StartUsed ) + " = " + str( self._ThreadCpuUsed ) )
                 return self._ThreadCpuUsed