Commit 50ec4359 by Maxime Grégoire

Fix timer issue in command queues

Change-Id: I937c38e4cf7f022f6c807c4f9ddf2c2e19f90b6f Reviewed-on: https://swiftshader-review.googlesource.com/3704Reviewed-by: 's avatarMaxime Grégoire <mgregoire@google.com> Tested-by: 's avatarMaxime Grégoire <mgregoire@google.com>
parent 789a9a73
...@@ -178,6 +178,7 @@ ...@@ -178,6 +178,7 @@
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\..\Common\CPUID.hpp" /> <ClInclude Include="..\..\Common\CPUID.hpp" />
<ClInclude Include="..\..\Common\Memory.hpp" />
<ClInclude Include="..\..\Common\Resource.hpp" /> <ClInclude Include="..\..\Common\Resource.hpp" />
<ClInclude Include="..\..\Common\Thread.hpp" /> <ClInclude Include="..\..\Common\Thread.hpp" />
<ClInclude Include="buffer.h" /> <ClInclude Include="buffer.h" />
...@@ -205,6 +206,7 @@ ...@@ -205,6 +206,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\..\Common\CPUID.cpp" /> <ClCompile Include="..\..\Common\CPUID.cpp" />
<ClCompile Include="..\..\Common\Memory.cpp" />
<ClCompile Include="..\..\Common\Resource.cpp" /> <ClCompile Include="..\..\Common\Resource.cpp" />
<ClCompile Include="..\..\Common\Thread.cpp" /> <ClCompile Include="..\..\Common\Thread.cpp" />
<ClCompile Include="buffer.cpp" /> <ClCompile Include="buffer.cpp" />
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
#include <cstring> #include <cstring>
#include <cstdlib> #include <cstdlib>
#include <ctime>
#include <iostream> #include <iostream>
#include <Windows.h> #include <Windows.h>
#include <winsock.h>
using namespace Devices; using namespace Devices;
...@@ -550,7 +550,7 @@ getFILETIMEoffset() ...@@ -550,7 +550,7 @@ getFILETIMEoffset()
} }
int int
clock_gettime(int X, struct timeval *tv) clock_gettime(int X, timeval *tv)
{ {
LARGE_INTEGER t; LARGE_INTEGER t;
FILETIME f; FILETIME f;
...@@ -584,6 +584,7 @@ clock_gettime(int X, struct timeval *tv) ...@@ -584,6 +584,7 @@ clock_gettime(int X, struct timeval *tv)
t.QuadPart -= offset.QuadPart; t.QuadPart -= offset.QuadPart;
microseconds = (double)t.QuadPart / frequencyToMicroseconds; microseconds = (double)t.QuadPart / frequencyToMicroseconds;
t.QuadPart = microseconds; t.QuadPart = microseconds;
tv->tv_sec = t.QuadPart / 1000000; tv->tv_sec = t.QuadPart / 1000000;
tv->tv_usec = t.QuadPart % 1000000; tv->tv_usec = t.QuadPart % 1000000;
return (0); return (0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment