From fbf0326fccb5deceb8c1f2387883ed13702d60a7 Mon Sep 17 00:00:00 2001 From: Ovidiu Mircescu Date: Thu, 26 Jan 2023 11:13:22 +0100 Subject: [PATCH] Replace deprecated function time.clock. --- src/Container/SALOME_ComponentPy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.2