Implemented RtlTimeToElapsedTimeFields.

This commit is contained in:
Alexandre Julliard 2002-12-18 02:31:33 +00:00
parent 4943ced93a
commit a16ed909c5
2 changed files with 18 additions and 14 deletions

View File

@ -545,23 +545,27 @@ void WINAPI RtlSecondsSince1980ToTime( DWORD time, LARGE_INTEGER *res )
/******************************************************************************
* RtlTimeToElapsedTimeFields [NTDLL.@]
*
* ??
*
* PARAMS:
* liTime [?]: ??
* TimeFields [?]: ??
*
* RETURNS:
* Nothing.
*
* FIXME:
* Prototype guessed.
*/
VOID WINAPI RtlTimeToElapsedTimeFields(
PLARGE_INTEGER liTime,
PTIME_FIELDS TimeFields)
void WINAPI RtlTimeToElapsedTimeFields( const LARGE_INTEGER *Time, 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;
}
/***********************************************************************

View File

@ -1038,7 +1038,7 @@ NTSTATUS WINAPI RtlSystemTimeToLocalTime(const LARGE_INTEGER*,PLARGE_INTEGER);
void WINAPI RtlTimeToTimeFields(const LARGE_INTEGER*,PTIME_FIELDS);
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 RtlTimeToSecondsSince1980(const LARGE_INTEGER *,LPDWORD);
BOOL WINAPI RtlTryEnterCriticalSection(RTL_CRITICAL_SECTION *);