From e04ed70577b78de958afda59a3173a5e7addfe10 Mon Sep 17 00:00:00 2001 From: Alex Bilger Date: Mon, 28 Jul 2025 12:08:27 +0200 Subject: [PATCH] Get timer as a floating-point type instead of an integer --- .../src/SofaPython3/SofaRuntime/Timer/Submodule_Timer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/SofaRuntime/src/SofaPython3/SofaRuntime/Timer/Submodule_Timer.cpp b/bindings/SofaRuntime/src/SofaPython3/SofaRuntime/Timer/Submodule_Timer.cpp index 762f33212..b18d88a01 100644 --- a/bindings/SofaRuntime/src/SofaPython3/SofaRuntime/Timer/Submodule_Timer.cpp +++ b/bindings/SofaRuntime/src/SofaPython3/SofaRuntime/Timer/Submodule_Timer.cpp @@ -40,7 +40,7 @@ py::dict getRecords(const std::string & id) { static auto timer_freq = CTime::getTicksPerSec(); auto getTime = [](ctime_t t) { - return 1000 * t / timer_freq; + return 1000. * t / timer_freq; }; const auto records = AdvancedTimer::getRecords(id);