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
37a23687
Commit
37a23687
authored
Apr 22, 2021
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 22, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Factor out get_time_stamp helper.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8b6a3f55
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
7 deletions
+13
-7
htmlevent.c
dlls/mshtml/htmlevent.c
+1
-7
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
task.c
dlls/mshtml/task.c
+11
-0
No files found.
dlls/mshtml/htmlevent.c
View file @
37a23687
...
...
@@ -2208,12 +2208,8 @@ static DOMEvent *alloc_event(nsIDOMEvent *nsevent, compat_mode_t compat_mode, ev
{
dispex_static_data_t
*
dispex_data
=
&
DOMEvent_dispex
;
DOMEvent
*
event
=
NULL
;
FILETIME
time
;
nsresult
nsres
;
/* 1601 to 1970 is 369 years plus 89 leap days */
const
ULONGLONG
time_epoch
=
(
ULONGLONG
)(
369
*
365
+
89
)
*
86400
*
1000
;
if
(
check_event_iface
(
nsevent
,
&
IID_nsIDOMCustomEvent
))
{
DOMCustomEvent
*
custom_event
=
heap_alloc_zero
(
sizeof
(
*
custom_event
));
if
(
!
custom_event
)
...
...
@@ -2247,9 +2243,7 @@ static DOMEvent *alloc_event(nsIDOMEvent *nsevent, compat_mode_t compat_mode, ev
}
nsIDOMEvent_AddRef
(
event
->
nsevent
=
nsevent
);
GetSystemTimeAsFileTime
(
&
time
);
event
->
time_stamp
=
(((
ULONGLONG
)
time
.
dwHighDateTime
<<
32
)
+
time
.
dwLowDateTime
)
/
10000
-
time_epoch
;
event
->
time_stamp
=
get_time_stamp
();
nsres
=
nsIDOMEvent_QueryInterface
(
nsevent
,
&
IID_nsIDOMUIEvent
,
(
void
**
)
&
event
->
ui_event
);
if
(
NS_SUCCEEDED
(
nsres
))
...
...
dlls/mshtml/mshtml_private.h
View file @
37a23687
...
...
@@ -1212,6 +1212,7 @@ HWND get_thread_hwnd(void) DECLSPEC_HIDDEN;
LONG
get_task_target_magic
(
void
)
DECLSPEC_HIDDEN
;
HRESULT
push_task
(
task_t
*
,
task_proc_t
,
task_proc_t
,
LONG
)
DECLSPEC_HIDDEN
;
void
remove_target_tasks
(
LONG
)
DECLSPEC_HIDDEN
;
ULONGLONG
get_time_stamp
(
void
)
DECLSPEC_HIDDEN
;
enum
timer_type
{
TIMER_TIMEOUT
,
...
...
dlls/mshtml/task.c
View file @
37a23687
...
...
@@ -380,3 +380,14 @@ thread_data_t *get_thread_data(BOOL create)
return
thread_data
;
}
ULONGLONG
get_time_stamp
(
void
)
{
FILETIME
time
;
/* 1601 to 1970 is 369 years plus 89 leap days */
const
ULONGLONG
time_epoch
=
(
ULONGLONG
)(
369
*
365
+
89
)
*
86400
*
1000
;
GetSystemTimeAsFileTime
(
&
time
);
return
(((
ULONGLONG
)
time
.
dwHighDateTime
<<
32
)
+
time
.
dwLowDateTime
)
/
10000
-
time_epoch
;
}
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