From 4a43eab4dd9c22a45c2390f03afffa055b30f3ef Mon Sep 17 00:00:00 2001 From: Haydn Trigg Date: Sat, 26 Jul 2014 00:44:15 +0930 Subject: [PATCH 1/3] Update btQuickprof.h --- src/LinearMath/btQuickprof.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/LinearMath/btQuickprof.h b/src/LinearMath/btQuickprof.h index 93f3f4a60..362f62d6d 100644 --- a/src/LinearMath/btQuickprof.h +++ b/src/LinearMath/btQuickprof.h @@ -52,6 +52,11 @@ public: /// Returns the time in us since the last call to reset or since /// the Clock was created. unsigned long int getTimeMicroseconds(); + + /// Returns the time in s since the last call to reset or since + /// the Clock was created. + btScalar getTimeSeconds(); + private: struct btClockData* m_data; }; From 6ff7a6d48b81e4954b4de0aa8170f383d1175676 Mon Sep 17 00:00:00 2001 From: Haydn Trigg Date: Sat, 26 Jul 2014 00:44:16 +0930 Subject: [PATCH 2/3] 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) From 3d944782e9a53857c355bf09d042eac67770062d Mon Sep 17 00:00:00 2001 From: Haydn Trigg Date: Fri, 1 Aug 2014 07:25:31 +0930 Subject: [PATCH 3/3] Update btQuickprof.cpp removed inline declaration from get time seconds function definition --- src/LinearMath/btQuickprof.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LinearMath/btQuickprof.cpp b/src/LinearMath/btQuickprof.cpp index cbf28faa6..4a2e58aef 100644 --- a/src/LinearMath/btQuickprof.cpp +++ b/src/LinearMath/btQuickprof.cpp @@ -239,7 +239,7 @@ 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() +btScalar btClock::getTimeSeconds() { static const btScalar microseconds_to_seconds = btScalar(0.000001); return btScalar(getTimeMicroseconds()) * microseconds_to_seconds;