From 0004bf4a232a22631abf4f4a750790d9ff7b789a Mon Sep 17 00:00:00 2001 From: Liam Mitchell Date: Sat, 6 Jan 2018 00:20:58 +1300 Subject: [PATCH] No cast in SampleInterfaces BuildContext::doStopTimer (#299) Removed int cast because it led to loss of time data. Fixes #289 --- RecastDemo/Source/SampleInterfaces.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RecastDemo/Source/SampleInterfaces.cpp b/RecastDemo/Source/SampleInterfaces.cpp index 44b306b..72bb34c 100644 --- a/RecastDemo/Source/SampleInterfaces.cpp +++ b/RecastDemo/Source/SampleInterfaces.cpp @@ -68,7 +68,7 @@ void BuildContext::doStartTimer(const rcTimerLabel label) void BuildContext::doStopTimer(const rcTimerLabel label) { const TimeVal endTime = getPerfTime(); - const int deltaTime = (int)(endTime - m_startTime[label]); + const TimeVal deltaTime = endTime - m_startTime[label]; if (m_accTime[label] == -1) m_accTime[label] = deltaTime; else