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
9b12068c
Commit
9b12068c
authored
May 21, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use the user shared data to implement RtlQueryUnbiasedInterruptTime().
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cc595304
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
time.c
dlls/ntdll/tests/time.c
+0
-2
time.c
dlls/ntdll/time.c
+12
-1
No files found.
dlls/ntdll/tests/time.c
View file @
9b12068c
...
...
@@ -222,8 +222,6 @@ static void test_user_shared_data_time(void)
pRtlQueryUnbiasedInterruptTime
(
&
t3
);
}
while
(
t3
<
t1
&&
i
++
<
1
);
/* allow for wrap, but only once */
/* FIXME: not always in order, but should be close */
todo_wine_if
(
t1
>
t2
&&
t1
-
t2
<
50
*
TICKSPERMSEC
)
ok
(
t1
<=
t2
,
"USD InterruptTime / RtlQueryUnbiasedInterruptTime are out of order %s %s
\n
"
,
wine_dbgstr_longlong
(
t1
),
wine_dbgstr_longlong
(
t2
));
ok
(
t2
<=
t3
||
broken
(
t2
==
t3
+
82410089070
)
/* w864 has some weird offset on testbot */
,
...
...
dlls/ntdll/time.c
View file @
9b12068c
...
...
@@ -47,6 +47,7 @@
#define NONAMELESSUNION
#include "windef.h"
#include "winternl.h"
#include "ddk/wdm.h"
#include "wine/exception.h"
#include "wine/debug.h"
#include "ntdll_misc.h"
...
...
@@ -1128,11 +1129,21 @@ NTSTATUS WINAPI NtSetSystemTime(const LARGE_INTEGER *NewTime, LARGE_INTEGER *Old
*/
BOOL
WINAPI
RtlQueryUnbiasedInterruptTime
(
ULONGLONG
*
time
)
{
ULONG
high
,
low
;
if
(
!
time
)
{
RtlSetLastWin32ErrorAndNtStatusFromNtStatus
(
STATUS_INVALID_PARAMETER
);
return
FALSE
;
}
*
time
=
monotonic_counter
();
do
{
high
=
user_shared_data
->
InterruptTime
.
High1Time
;
low
=
user_shared_data
->
InterruptTime
.
LowPart
;
}
while
(
high
!=
user_shared_data
->
InterruptTime
.
High2Time
);
/* FIXME: should probably subtract InterruptTimeBias */
*
time
=
(
ULONGLONG
)
high
<<
32
|
low
;
return
TRUE
;
}
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