From: Ovidiu Mircescu Date: Thu, 26 Jan 2023 10:13:22 +0000 (+0100) Subject: Replace deprecated function time.clock. X-Git-Tag: V9_11_0a1~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fbf0326fccb5deceb8c1f2387883ed13702d60a7;p=modules%2Fkernel.git Replace deprecated function time.clock. --- diff --git a/src/Container/SALOME_ComponentPy.py b/src/Container/SALOME_ComponentPy.py index b426f724a..349a696f8 100644 --- a/src/Container/SALOME_ComponentPy.py +++ b/src/Container/SALOME_ComponentPy.py @@ -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