NT4/private/ntos/dd/qic117/0x15a10.c
2020-09-30 17:12:29 +02:00

77 lines
1.9 KiB
C
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*****************************************************************************
*
* COPYRIGHT 1993 - COLORADO MEMORY SYSTEMS, INC.
* ALL RIGHTS RESERVED.
*
******************************************************************************
*
* FILE: \SE\DRIVER\Q117KDI\NT\SRC\0X15A10.C
*
* FUNCTION: kdi_GetSystemTime
*
* PURPOSE: Gets the system time in milliseconds
*
* HISTORY:
* $Log: J:\se.vcs\driver\q117kdi\nt\src\0x15a10.c $
*
* Rev 1.3 26 Apr 1994 16:23:02 KEVINKES
* Added a modification to allow for the
* conversion of an SDDWord to a UDDWord.
*
* Rev 1.2 18 Feb 1994 16:53:14 KEVINKES
* Changed a couple of data type to unsigned.
*
* Rev 1.1 18 Feb 1994 15:44:00 KEVINKES
* Changed nanosec_interval to a UDDWord.
*
* Rev 1.0 17 Feb 1994 11:50:56 KEVINKES
* Initial Revision.
*
*****************************************************************************/
#define FCT_ID 0x15A10
#include "include\public\adi_api.h"
#include "include\public\frb_api.h"
#include "q117kdi\include\kdiwhio.h"
#include "q117kdi\include\kdiwpriv.h"
#include "include\private\kdi_pub.h"
/*endinclude*/
dUDWord kdi_GetSystemTime
(
/* INPUT PARAMETERS: */
/* UPDATE PARAMETERS: */
/* OUTPUT PARAMETERS: */
)
/* COMMENTS: *****************************************************************
*
* DEFINITIONS: *************************************************************/
{
/* DATA: ********************************************************************/
dUDWord remainder;
dUDWord time_increment;
dUDDWord nanosec_interval;
dSDDWord tick_count;
dSDDWord temp;
/* CODE: ********************************************************************/
time_increment = KeQueryTimeIncrement();
KeQueryTickCount(&tick_count);
temp = RtlExtendedIntegerMultiply(
tick_count,
time_increment);
nanosec_interval = *(dUDDWord *)&temp;
return RtlEnlargedUnsignedDivide(
nanosec_interval,
NANOSEC_PER_MILLISEC,
&remainder);
}