Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
60319788
Unverified
Commit
60319788
authored
Aug 23, 2019
by
Edward Thomson
Committed by
GitHub
Aug 23, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5054 from tniessen/util-use-64-bit-timer
util: use 64 bit timer on Windows
parents
feac5945
071750a3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
17 deletions
+7
-17
CMakeLists.txt
+5
-0
src/CMakeLists.txt
+0
-2
src/util.h
+2
-15
No files found.
CMakeLists.txt
View file @
60319788
...
@@ -263,6 +263,11 @@ ELSE ()
...
@@ -263,6 +263,11 @@ ELSE ()
ENDIF
()
ENDIF
()
ENDIF
()
ENDIF
()
# Ensure that MinGW provides the correct header files.
IF
(
WIN32 AND NOT CYGWIN
)
ADD_DEFINITIONS
(
-DWIN32 -D_WIN32_WINNT=0x0600
)
ENDIF
()
IF
(
NOT CMAKE_CONFIGURATION_TYPES
)
IF
(
NOT CMAKE_CONFIGURATION_TYPES
)
# Build Debug by default
# Build Debug by default
IF
(
NOT CMAKE_BUILD_TYPE
)
IF
(
NOT CMAKE_BUILD_TYPE
)
...
...
src/CMakeLists.txt
View file @
60319788
...
@@ -299,8 +299,6 @@ FILE(GLOB SRC_H
...
@@ -299,8 +299,6 @@ FILE(GLOB SRC_H
# On Windows use specific platform sources
# On Windows use specific platform sources
IF
(
WIN32 AND NOT CYGWIN
)
IF
(
WIN32 AND NOT CYGWIN
)
ADD_DEFINITIONS
(
-DWIN32 -D_WIN32_WINNT=0x0600
)
IF
(
MSVC
)
IF
(
MSVC
)
SET
(
WIN_RC
"win32/git2.rc"
)
SET
(
WIN_RC
"win32/git2.rc"
)
ENDIF
()
ENDIF
()
...
...
src/util.h
View file @
60319788
...
@@ -357,22 +357,9 @@ GIT_INLINE(void) git__memzero(void *data, size_t size)
...
@@ -357,22 +357,9 @@ GIT_INLINE(void) git__memzero(void *data, size_t size)
GIT_INLINE
(
double
)
git__timer
(
void
)
GIT_INLINE
(
double
)
git__timer
(
void
)
{
{
/* We need the initial tick count to detect if the tick
/* GetTickCount64 returns the number of milliseconds that have
* count has rolled over. */
static
DWORD
initial_tick_count
=
0
;
/* GetTickCount returns the number of milliseconds that have
* elapsed since the system was started. */
* elapsed since the system was started. */
DWORD
count
=
GetTickCount
();
return
(
double
)
GetTickCount64
()
/
(
double
)
1000
;
if
(
initial_tick_count
==
0
)
{
initial_tick_count
=
count
;
}
else
if
(
count
<
initial_tick_count
)
{
/* The tick count has rolled over - adjust for it. */
count
=
(
0xFFFFFFFF
-
initial_tick_count
)
+
count
;
}
return
(
double
)
count
/
(
double
)
1000
;
}
}
#elif __APPLE__
#elif __APPLE__
...
...
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