Retrieve interrupt time via kernel shared data
This commit is contained in:
@@ -25,6 +25,7 @@ namespace KE
|
|||||||
STATIC ULONG TimeAdjustment;
|
STATIC ULONG TimeAdjustment;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
STATIC XTAPI VOID GetInterruptTime(OUT PLARGE_INTEGER InterruptTime);
|
||||||
STATIC XTAPI VOID GetSystemTime(OUT PLARGE_INTEGER SystemTime);
|
STATIC XTAPI VOID GetSystemTime(OUT PLARGE_INTEGER SystemTime);
|
||||||
STATIC XTAPI VOID SetSystemTime(IN PLARGE_INTEGER NewTime,
|
STATIC XTAPI VOID SetSystemTime(IN PLARGE_INTEGER NewTime,
|
||||||
OUT PLARGE_INTEGER OldTime,
|
OUT PLARGE_INTEGER OldTime,
|
||||||
|
|||||||
@@ -9,6 +9,26 @@
|
|||||||
#include <xtos.hh>
|
#include <xtos.hh>
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the current interrupt time.
|
||||||
|
*
|
||||||
|
* @param SystemTime
|
||||||
|
* Supplies a pointer to a variable that receives the current interrupt time.
|
||||||
|
*
|
||||||
|
* @return This routine does not return any value.
|
||||||
|
*
|
||||||
|
* @since XT 1.0
|
||||||
|
*/
|
||||||
|
XTAPI
|
||||||
|
VOID
|
||||||
|
KE::SystemTime::GetInterruptTime(OUT PLARGE_INTEGER InterruptTime)
|
||||||
|
{
|
||||||
|
LARGE_INTEGER CurrentTime;
|
||||||
|
|
||||||
|
/* Fetch the time using the lock-free shared data mechanism and return it */
|
||||||
|
CurrentTime = KE::SharedData::GetInterruptTime();
|
||||||
|
InterruptTime->QuadPart = CurrentTime.QuadPart;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the current system time.
|
* Returns the current system time.
|
||||||
|
|||||||
Reference in New Issue
Block a user