Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
b741905c
Commit
b741905c
authored
Oct 11, 2004
by
Hans Leidekker
Committed by
Alexandre Julliard
Oct 11, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid using gettimeofday.
parent
84e9eb65
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
14 deletions
+7
-14
dosmem.c
dlls/kernel/dosmem.c
+7
-14
No files found.
dlls/kernel/dosmem.c
View file @
b741905c
...
...
@@ -31,11 +31,6 @@
# include <sys/mman.h>
#endif
#include <time.h>
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
#include "windef.h"
#include "winbase.h"
#include "wine/winbase16.h"
...
...
@@ -193,19 +188,17 @@ static BIOSDATA * DOSMEM_BiosData(void)
*/
static
DWORD
DOSMEM_GetTicksSinceMidnight
(
void
)
{
struct
tm
*
bdtime
;
struct
timeval
tvs
;
time_t
seconds
;
SYSTEMTIME
time
;
/* This should give us the (approximately) correct
* 18.206 clock ticks per second since midnight.
*/
gettimeofday
(
&
tvs
,
NULL
);
seconds
=
tvs
.
tv_sec
;
bdtime
=
localtime
(
&
seconds
);
return
(((
bdtime
->
tm_hour
*
3600
+
bdtime
->
tm_min
*
60
+
bdtime
->
tm_sec
)
*
18206
)
/
1000
)
+
(
tvs
.
tv_usec
/
54927
);
GetLocalTime
(
&
time
)
;
return
(((
time
.
wHour
*
3600
+
time
.
wMinute
*
60
+
time
.
wSecond
)
*
18206
)
/
1000
)
+
(
time
.
wMilliseconds
*
1000
/
54927
);
}
/***********************************************************************
...
...
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