"tools/vscode:/vscode.git/clone" did not exist on "8fd9c26f6e3e06c9858eb2beb50dd1f05e892f2d"
Commit 9ed05fa7 authored by Davis King's avatar Davis King
Browse files

Made the timestamper use timeGetTime() instead of GetTickCount() on windows

since timeGetTime() is more accurate.
parent a9c5c98d
...@@ -136,9 +136,9 @@ if (NOT TARGET dlib) ...@@ -136,9 +136,9 @@ if (NOT TARGET dlib)
# we want to link to the right stuff depending on our platform. # we want to link to the right stuff depending on our platform.
if (WIN32 AND NOT CYGWIN) ############################################################################### if (WIN32 AND NOT CYGWIN) ###############################################################################
if (DLIB_NO_GUI_SUPPORT) if (DLIB_NO_GUI_SUPPORT)
set (dlib_needed_libraries ws2_32) set (dlib_needed_libraries ws2_32 winmm)
else() else()
set (dlib_needed_libraries ws2_32 comctl32 gdi32 imm32) set (dlib_needed_libraries ws2_32 winmm comctl32 gdi32 imm32)
endif() endif()
elseif(APPLE) ############################################################################ elseif(APPLE) ############################################################################
find_library(pthreadlib pthread) find_library(pthreadlib pthread)
......
...@@ -13,6 +13,11 @@ ...@@ -13,6 +13,11 @@
#include "../windows_magic.h" #include "../windows_magic.h"
#include <windows.h> #include <windows.h>
// tell visual studio to link to the library needed to call timeGetTime()
#ifdef _MSC_VER
#pragma comment (lib, "winmm.lib")
#endif
#ifdef __BORLANDC__ #ifdef __BORLANDC__
// Apparently the borland compiler doesn't define this. // Apparently the borland compiler doesn't define this.
#define INVALID_FILE_ATTRIBUTES ((DWORD)-1) #define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
...@@ -89,7 +94,7 @@ namespace dlib ...@@ -89,7 +94,7 @@ namespace dlib
get_timestamp ( get_timestamp (
) const ) const
{ {
unsigned long temp = GetTickCount(); unsigned long temp = timeGetTime();
if (temp >= last_time) if (temp >= last_time)
{ {
last_time = temp; last_time = temp;
......
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