Daniel Lehman : msvcp140: Add _Query_perf_[counter|frequency].
Alexandre Julliard
julliard at winehq.org
Wed Aug 10 11:05:57 CDT 2016
Module: wine
Branch: master
Commit: 1026e85d9f041fbd34d431b718740d1deb76fc95
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1026e85d9f041fbd34d431b718740d1deb76fc95
Author: Daniel Lehman <dlehman at esri.com>
Date: Wed Aug 10 10:09:25 2016 +0200
msvcp140: Add _Query_perf_[counter|frequency].
Signed-off-by: Daniel Lehman <dlehman at esri.com>
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/msvcp140/msvcp140.spec | 4 ++--
dlls/msvcp90/misc.c | 16 ++++++++++++++++
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/dlls/msvcp140/msvcp140.spec b/dlls/msvcp140/msvcp140.spec
index 22c302e..6e17e0d 100644
--- a/dlls/msvcp140/msvcp140.spec
+++ b/dlls/msvcp140/msvcp140.spec
@@ -3690,8 +3690,8 @@
@ stub _Mtxunlock
@ extern _Nan _Nan
@ stub _Open_dir
-@ stub _Query_perf_counter
-@ stub _Query_perf_frequency
+@ cdecl -ret64 _Query_perf_counter()
+@ cdecl -ret64 _Query_perf_frequency()
@ stub _Read_dir
@ stub _Remove_dir
@ stub _Rename
diff --git a/dlls/msvcp90/misc.c b/dlls/msvcp90/misc.c
index 418f42b..7418fd2 100644
--- a/dlls/msvcp90/misc.c
+++ b/dlls/msvcp90/misc.c
@@ -1180,3 +1180,19 @@ void free_misc(void)
NtClose(keyed_event);
#endif
}
+
+#if _MSVCP_VER >= 140
+LONGLONG __cdecl _Query_perf_counter(void)
+{
+ LARGE_INTEGER li;
+ QueryPerformanceCounter(&li);
+ return li.QuadPart;
+}
+
+LONGLONG __cdecl _Query_perf_frequency(void)
+{
+ LARGE_INTEGER li;
+ QueryPerformanceFrequency(&li);
+ return li.QuadPart;
+}
+#endif
More information about the wine-cvs
mailing list