Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
9ed05fa7
Commit
9ed05fa7
authored
Jan 29, 2015
by
Davis King
Browse files
Made the timestamper use timeGetTime() instead of GetTickCount() on windows
since timeGetTime() is more accurate.
parent
a9c5c98d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
dlib/CMakeLists.txt
dlib/CMakeLists.txt
+2
-2
dlib/misc_api/misc_api_kernel_1.cpp
dlib/misc_api/misc_api_kernel_1.cpp
+6
-1
No files found.
dlib/CMakeLists.txt
View file @
9ed05fa7
...
...
@@ -136,9 +136,9 @@ if (NOT TARGET dlib)
# we want to link to the right stuff depending on our platform.
if
(
WIN32 AND NOT CYGWIN
)
###############################################################################
if
(
DLIB_NO_GUI_SUPPORT
)
set
(
dlib_needed_libraries ws2_32
)
set
(
dlib_needed_libraries ws2_32
winmm
)
else
()
set
(
dlib_needed_libraries ws2_32 comctl32 gdi32 imm32
)
set
(
dlib_needed_libraries ws2_32
winmm
comctl32 gdi32 imm32
)
endif
()
elseif
(
APPLE
)
############################################################################
find_library
(
pthreadlib pthread
)
...
...
dlib/misc_api/misc_api_kernel_1.cpp
View file @
9ed05fa7
...
...
@@ -13,6 +13,11 @@
#include "../windows_magic.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__
// Apparently the borland compiler doesn't define this.
#define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
...
...
@@ -89,7 +94,7 @@ namespace dlib
get_timestamp
(
)
const
{
unsigned
long
temp
=
GetTi
ckCount
();
unsigned
long
temp
=
time
GetTi
me
();
if
(
temp
>=
last_time
)
{
last_time
=
temp
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment