Explorar o código

Merge pull request #1350 from Azaezel/timingIsEverything

fills in profiler timer fallback
Daniel Buckmaster %!s(int64=10) %!d(string=hai) anos
pai
achega
ec63398042
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      Engine/source/platform/profiler.cpp

+ 3 - 1
Engine/source/platform/profiler.cpp

@@ -155,11 +155,13 @@ U32 endHighResolutionTimer(U32 time[2])  {
 
 void startHighResolutionTimer(U32 time[2])
 {
+   time[0] = Platform::getRealMilliseconds();
 }
 
 U32 endHighResolutionTimer(U32 time[2])
 {
-   return 1;
+   U32 ticks = Platform::getRealMilliseconds() - time[0];
+   return ticks;
 }
 
 #endif