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
94152d50
Commit
94152d50
authored
May 29, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some alignment issues (based on a patch by Gregg Mattinson).
parent
3629074d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
8 deletions
+14
-8
time.c
dlls/kernel/time.c
+4
-2
time.c
dlls/ntdll/time.c
+10
-6
No files found.
dlls/kernel/time.c
View file @
94152d50
...
...
@@ -541,8 +541,10 @@ VOID WINAPI GetSystemTimeAsFileTime(
*/
static
void
TIME_ClockTimeToFileTime
(
clock_t
unix_time
,
LPFILETIME
filetime
)
{
LONGLONG
secs
=
RtlEnlargedUnsignedMultiply
(
unix_time
,
10000000
);
((
LARGE_INTEGER
*
)
filetime
)
->
QuadPart
=
RtlExtendedLargeIntegerDivide
(
secs
,
CLK_TCK
,
NULL
);
ULONGLONG
secs
=
RtlEnlargedUnsignedMultiply
(
unix_time
,
10000000
);
secs
=
RtlExtendedLargeIntegerDivide
(
secs
,
CLK_TCK
,
NULL
);
filetime
->
dwLowDateTime
=
(
DWORD
)
secs
;
filetime
->
dwHighDateTime
=
(
DWORD
)(
secs
>>
32
);
}
/*********************************************************************
...
...
dlls/ntdll/time.c
View file @
94152d50
...
...
@@ -206,7 +206,8 @@ VOID WINAPI RtlSystemTimeToLocalTime(
*/
BOOLEAN
WINAPI
RtlTimeToSecondsSince1970
(
const
FILETIME
*
time
,
LPDWORD
res
)
{
ULONGLONG
tmp
=
RtlLargeIntegerDivide
(
((
LARGE_INTEGER
*
)
time
)
->
QuadPart
,
10000000LL
,
NULL
);
ULONGLONG
tmp
=
((
ULONGLONG
)
time
->
dwHighDateTime
<<
32
)
|
time
->
dwLowDateTime
;
tmp
=
RtlLargeIntegerDivide
(
tmp
,
10000000LL
,
NULL
);
tmp
-=
SECS_1601_TO_1970
;
if
(
tmp
>
0xffffffff
)
return
FALSE
;
*
res
=
(
DWORD
)
tmp
;
...
...
@@ -218,7 +219,8 @@ BOOLEAN WINAPI RtlTimeToSecondsSince1970( const FILETIME *time, LPDWORD res )
*/
BOOLEAN
WINAPI
RtlTimeToSecondsSince1980
(
const
FILETIME
*
time
,
LPDWORD
res
)
{
ULONGLONG
tmp
=
RtlLargeIntegerDivide
(
((
LARGE_INTEGER
*
)
time
)
->
QuadPart
,
10000000LL
,
NULL
);
ULONGLONG
tmp
=
((
ULONGLONG
)
time
->
dwHighDateTime
<<
32
)
|
time
->
dwLowDateTime
;
tmp
=
RtlLargeIntegerDivide
(
tmp
,
10000000LL
,
NULL
);
tmp
-=
SECS_1601_to_1980
;
if
(
tmp
>
0xffffffff
)
return
FALSE
;
*
res
=
(
DWORD
)
tmp
;
...
...
@@ -230,8 +232,9 @@ BOOLEAN WINAPI RtlTimeToSecondsSince1980( const FILETIME *time, LPDWORD res )
*/
void
WINAPI
RtlSecondsSince1970ToTime
(
DWORD
time
,
FILETIME
*
res
)
{
LONGLONG
secs
=
time
+
SECS_1601_TO_1970
;
((
LARGE_INTEGER
*
)
res
)
->
QuadPart
=
RtlExtendedIntegerMultiply
(
secs
,
10000000
);
ULONGLONG
secs
=
RtlExtendedIntegerMultiply
(
time
+
SECS_1601_TO_1970
,
10000000
);
res
->
dwLowDateTime
=
(
DWORD
)
secs
;
res
->
dwHighDateTime
=
(
DWORD
)(
secs
>>
32
);
}
/******************************************************************************
...
...
@@ -239,8 +242,9 @@ void WINAPI RtlSecondsSince1970ToTime( DWORD time, FILETIME *res )
*/
void
WINAPI
RtlSecondsSince1980ToTime
(
DWORD
time
,
FILETIME
*
res
)
{
LONGLONG
secs
=
time
+
SECS_1601_to_1980
;
((
LARGE_INTEGER
*
)
res
)
->
QuadPart
=
RtlExtendedIntegerMultiply
(
secs
,
10000000
);
ULONGLONG
secs
=
RtlExtendedIntegerMultiply
(
time
+
SECS_1601_to_1980
,
10000000
);
res
->
dwLowDateTime
=
(
DWORD
)
secs
;
res
->
dwHighDateTime
=
(
DWORD
)(
secs
>>
32
);
}
/******************************************************************************
...
...
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