From 6ff7a6d48b81e4954b4de0aa8170f383d1175676 Mon Sep 17 00:00:00 2001 From: Haydn Trigg Date: Sat, 26 Jul 2014 00:44:16 +0930 Subject: [PATCH] Update btQuickprof.cpp --- src/LinearMath/btQuickprof.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/LinearMath/btQuickprof.cpp b/src/LinearMath/btQuickprof.cpp index 44e212f31..cbf28faa6 100644 --- a/src/LinearMath/btQuickprof.cpp +++ b/src/LinearMath/btQuickprof.cpp @@ -237,6 +237,14 @@ unsigned long int btClock::getTimeMicroseconds() +/// Returns the time in s since the last call to reset or since +/// the Clock was created. +inline btScalar btClock::getTimeSeconds() +{ + static const btScalar microseconds_to_seconds = btScalar(0.000001); + return btScalar(getTimeMicroseconds()) * microseconds_to_seconds; +} + inline void Profile_Get_Ticks(unsigned long int * ticks)