Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
7fc1cbb6
Commit
7fc1cbb6
authored
10 years ago
by
Marc Hoersken
Browse files
Options
Downloads
Patches
Plain Diff
tool_util.c: Use GetTickCount64 if it is available
parent
b9950e3b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/tool_util.c
+10
-1
10 additions, 1 deletion
src/tool_util.c
with
10 additions
and
1 deletion
src/tool_util.c
+
10
−
1
View file @
7fc1cbb6
...
...
@@ -33,10 +33,19 @@ struct timeval tool_tvnow(void)
** GetTickCount() is available on _all_ Windows versions from W95 up
** to nowadays. Returns milliseconds elapsed since last system boot,
** increases monotonically and wraps once 49.7 days have elapsed.
**
** GetTickCount64() is available on Windows version from Windows Vista
** and Windows Server 2008 up to nowadays. The resolution of the
** function is limited to the resolution of the system timer, which
** is typically in the range of 10 milliseconds to 16 milliseconds.
*/
struct
timeval
now
;
#if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600)
ULONGLONG
milliseconds
=
GetTickCount64
();
#else
DWORD
milliseconds
=
GetTickCount
();
now
.
tv_sec
=
milliseconds
/
1000
;
#endif
now
.
tv_sec
=
(
long
)(
milliseconds
/
1000
);
now
.
tv_usec
=
(
milliseconds
%
1000
)
*
1000
;
return
now
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment