Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
04e14c7b
Commit
04e14c7b
authored
Jan 28, 2013
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Add support for the monotonic time counter on Mac OS X.
parent
25598513
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
time.c
dlls/ntdll/time.c
+8
-0
No files found.
dlls/ntdll/time.c
View file @
04e14c7b
...
...
@@ -38,6 +38,9 @@
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifdef __APPLE__
# include <mach/mach_time.h>
#endif
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
...
...
@@ -111,6 +114,11 @@ static ULONGLONG monotonic_counter(void)
#endif
if
(
!
clock_gettime
(
CLOCK_MONOTONIC
,
&
ts
))
return
ts
.
tv_sec
*
(
ULONGLONG
)
TICKSPERSEC
+
ts
.
tv_nsec
/
100
;
#elif defined(__APPLE__)
static
mach_timebase_info_data_t
timebase
;
if
(
!
timebase
.
denom
)
mach_timebase_info
(
&
timebase
);
return
mach_absolute_time
()
*
timebase
.
numer
/
timebase
.
denom
/
100
;
#endif
gettimeofday
(
&
now
,
0
);
...
...
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