浏览代码

fills in profiler timer fallback as per remmed out lines in other samples. see https://github.com/GarageGames/Torque3D/issues/1349 for report, and https://gist.github.com/Azaezel/2aafb88cf0d642418051 for result

Azaezel 10 年之前
父节点
当前提交
bf1449e3a7
共有 1 个文件被更改,包括 3 次插入1 次删除
  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