Commit a16ed909 authored by Alexandre Julliard's avatar Alexandre Julliard

Implemented RtlTimeToElapsedTimeFields.

parent 4943ced9
...@@ -545,23 +545,27 @@ void WINAPI RtlSecondsSince1980ToTime( DWORD time, LARGE_INTEGER *res ) ...@@ -545,23 +545,27 @@ void WINAPI RtlSecondsSince1980ToTime( DWORD time, LARGE_INTEGER *res )
/****************************************************************************** /******************************************************************************
* RtlTimeToElapsedTimeFields [NTDLL.@] * RtlTimeToElapsedTimeFields [NTDLL.@]
* *
* ??
*
* PARAMS:
* liTime [?]: ??
* TimeFields [?]: ??
*
* RETURNS: * RETURNS:
* Nothing. * Nothing.
*
* FIXME:
* Prototype guessed.
*/ */
VOID WINAPI RtlTimeToElapsedTimeFields( void WINAPI RtlTimeToElapsedTimeFields( const LARGE_INTEGER *Time, PTIME_FIELDS TimeFields )
PLARGE_INTEGER liTime,
PTIME_FIELDS TimeFields)
{ {
FIXME("(%p,%p): stub\n",liTime,TimeFields); LONGLONG time;
UINT rem;
time = RtlExtendedLargeIntegerDivide( Time->QuadPart, TICKSPERSEC, &rem );
TimeFields->Milliseconds = rem / TICKSPERMSEC;
/* time is now in seconds */
TimeFields->Year = 0;
TimeFields->Month = 0;
TimeFields->Day = RtlExtendedLargeIntegerDivide( time, SECSPERDAY, &rem );
/* rem is now the remaining seconds in the last day */
TimeFields->Second = rem % 60;
rem /= 60;
TimeFields->Minute = rem % 60;
TimeFields->Hour = rem / 60;
} }
/*********************************************************************** /***********************************************************************
......
...@@ -1038,7 +1038,7 @@ NTSTATUS WINAPI RtlSystemTimeToLocalTime(const LARGE_INTEGER*,PLARGE_INTEGER); ...@@ -1038,7 +1038,7 @@ NTSTATUS WINAPI RtlSystemTimeToLocalTime(const LARGE_INTEGER*,PLARGE_INTEGER);
void WINAPI RtlTimeToTimeFields(const LARGE_INTEGER*,PTIME_FIELDS); void WINAPI RtlTimeToTimeFields(const LARGE_INTEGER*,PTIME_FIELDS);
BOOLEAN WINAPI RtlTimeFieldsToTime(PTIME_FIELDS,PLARGE_INTEGER); BOOLEAN WINAPI RtlTimeFieldsToTime(PTIME_FIELDS,PLARGE_INTEGER);
void WINAPI RtlTimeToElapsedTimeFields(PLARGE_INTEGER,PTIME_FIELDS); void WINAPI RtlTimeToElapsedTimeFields(const LARGE_INTEGER *,PTIME_FIELDS);
BOOLEAN WINAPI RtlTimeToSecondsSince1970(const LARGE_INTEGER *,PULONG); BOOLEAN WINAPI RtlTimeToSecondsSince1970(const LARGE_INTEGER *,PULONG);
BOOLEAN WINAPI RtlTimeToSecondsSince1980(const LARGE_INTEGER *,LPDWORD); BOOLEAN WINAPI RtlTimeToSecondsSince1980(const LARGE_INTEGER *,LPDWORD);
BOOL WINAPI RtlTryEnterCriticalSection(RTL_CRITICAL_SECTION *); BOOL WINAPI RtlTryEnterCriticalSection(RTL_CRITICAL_SECTION *);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment