forked from Mirrors/wine-wine
kernel32: Move Get/SetSystemTimeAdjustment to kernelbase.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>feature/deterministic
parent
75e2f79b68
commit
4ccc3e5285
|
@ -832,7 +832,7 @@
|
||||||
@ stdcall GetSystemPreferredUILanguages(long ptr ptr ptr)
|
@ stdcall GetSystemPreferredUILanguages(long ptr ptr ptr)
|
||||||
@ stdcall GetSystemRegistryQuota(ptr ptr)
|
@ stdcall GetSystemRegistryQuota(ptr ptr)
|
||||||
@ stdcall -import GetSystemTime(ptr)
|
@ stdcall -import GetSystemTime(ptr)
|
||||||
@ stdcall GetSystemTimeAdjustment(ptr ptr ptr)
|
@ stdcall -import GetSystemTimeAdjustment(ptr ptr ptr)
|
||||||
@ stdcall -import GetSystemTimeAsFileTime(ptr)
|
@ stdcall -import GetSystemTimeAsFileTime(ptr)
|
||||||
@ stdcall -import GetSystemTimePreciseAsFileTime(ptr)
|
@ stdcall -import GetSystemTimePreciseAsFileTime(ptr)
|
||||||
@ stdcall -import GetSystemTimes(ptr ptr ptr)
|
@ stdcall -import GetSystemTimes(ptr ptr ptr)
|
||||||
|
@ -1445,7 +1445,7 @@
|
||||||
@ stdcall -import SetSystemFileCacheSize(long long long)
|
@ stdcall -import SetSystemFileCacheSize(long long long)
|
||||||
@ stdcall SetSystemPowerState(long long)
|
@ stdcall SetSystemPowerState(long long)
|
||||||
@ stdcall -import SetSystemTime(ptr)
|
@ stdcall -import SetSystemTime(ptr)
|
||||||
@ stdcall SetSystemTimeAdjustment(long long)
|
@ stdcall -import SetSystemTimeAdjustment(long long)
|
||||||
@ stdcall SetTapeParameters(ptr long ptr)
|
@ stdcall SetTapeParameters(ptr long ptr)
|
||||||
@ stdcall SetTapePosition(ptr long long long long long)
|
@ stdcall SetTapePosition(ptr long long long long long)
|
||||||
@ stdcall SetTermsrvAppInstallMode(long)
|
@ stdcall SetTermsrvAppInstallMode(long)
|
||||||
|
|
|
@ -56,53 +56,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(time);
|
||||||
static const struct _KUSER_SHARED_DATA *user_shared_data = (struct _KUSER_SHARED_DATA *)0x7ffe0000;
|
static const struct _KUSER_SHARED_DATA *user_shared_data = (struct _KUSER_SHARED_DATA *)0x7ffe0000;
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* GetSystemTimeAdjustment (KERNEL32.@)
|
|
||||||
*
|
|
||||||
* Get the period between clock interrupts and the amount the clock
|
|
||||||
* is adjusted each interrupt so as to keep it in sync with an external source.
|
|
||||||
*
|
|
||||||
* PARAMS
|
|
||||||
* lpTimeAdjustment [out] The clock adjustment per interrupt in 100's of nanoseconds.
|
|
||||||
* lpTimeIncrement [out] The time between clock interrupts in 100's of nanoseconds.
|
|
||||||
* lpTimeAdjustmentDisabled [out] The clock synchronisation has been disabled.
|
|
||||||
*
|
|
||||||
* RETURNS
|
|
||||||
* TRUE.
|
|
||||||
*
|
|
||||||
* BUGS
|
|
||||||
* Only the special case of disabled time adjustments is supported.
|
|
||||||
*/
|
|
||||||
BOOL WINAPI GetSystemTimeAdjustment( PDWORD lpTimeAdjustment, PDWORD lpTimeIncrement,
|
|
||||||
PBOOL lpTimeAdjustmentDisabled )
|
|
||||||
{
|
|
||||||
*lpTimeAdjustment = 0;
|
|
||||||
*lpTimeIncrement = 10000000 / sysconf(_SC_CLK_TCK);
|
|
||||||
*lpTimeAdjustmentDisabled = TRUE;
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* SetSystemTimeAdjustment (KERNEL32.@)
|
|
||||||
*
|
|
||||||
* Enables or disables the timing adjustments to the system's clock.
|
|
||||||
*
|
|
||||||
* PARAMS
|
|
||||||
* dwTimeAdjustment [in] Number of units to add per clock interrupt.
|
|
||||||
* bTimeAdjustmentDisabled [in] Adjustment mode.
|
|
||||||
*
|
|
||||||
* RETURNS
|
|
||||||
* Success: TRUE.
|
|
||||||
* Failure: FALSE.
|
|
||||||
*/
|
|
||||||
BOOL WINAPI SetSystemTimeAdjustment( DWORD dwTimeAdjustment, BOOL bTimeAdjustmentDisabled )
|
|
||||||
{
|
|
||||||
/* Fake function for now... */
|
|
||||||
FIXME("(%08x,%d): stub !\n", dwTimeAdjustment, bTimeAdjustmentDisabled);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
* GetCalendarInfoA (KERNEL32.@)
|
* GetCalendarInfoA (KERNEL32.@)
|
||||||
*
|
*
|
||||||
|
|
|
@ -3861,6 +3861,23 @@ void WINAPI DECLSPEC_HOTPATCH GetSystemTime( SYSTEMTIME *systime )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* GetSystemTimeAdjustment (kernelbase.@)
|
||||||
|
*/
|
||||||
|
BOOL WINAPI DECLSPEC_HOTPATCH GetSystemTimeAdjustment( DWORD *adjust, DWORD *increment, BOOL *disabled )
|
||||||
|
{
|
||||||
|
SYSTEM_TIME_ADJUSTMENT_QUERY st;
|
||||||
|
ULONG len;
|
||||||
|
|
||||||
|
if (!set_ntstatus( NtQuerySystemInformation( SystemTimeAdjustmentInformation, &st, sizeof(st), &len )))
|
||||||
|
return FALSE;
|
||||||
|
*adjust = st.TimeAdjustment;
|
||||||
|
*increment = st.TimeIncrement;
|
||||||
|
*disabled = st.TimeAdjustmentDisabled;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* GetSystemTimeAsFileTime (kernelbase.@)
|
* GetSystemTimeAsFileTime (kernelbase.@)
|
||||||
*/
|
*/
|
||||||
|
@ -3918,6 +3935,19 @@ BOOL WINAPI DECLSPEC_HOTPATCH SetSystemTime( const SYSTEMTIME *systime )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* SetSystemTimeAdjustment (kernelbase.@)
|
||||||
|
*/
|
||||||
|
BOOL WINAPI DECLSPEC_HOTPATCH SetSystemTimeAdjustment( DWORD adjust, BOOL disabled )
|
||||||
|
{
|
||||||
|
SYSTEM_TIME_ADJUSTMENT st;
|
||||||
|
|
||||||
|
st.TimeAdjustment = adjust;
|
||||||
|
st.TimeAdjustmentDisabled = disabled;
|
||||||
|
return set_ntstatus( NtSetSystemInformation( SystemTimeAdjustmentInformation, &st, sizeof(st) ));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
* SystemTimeToFileTime (kernelbase.@)
|
* SystemTimeToFileTime (kernelbase.@)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -695,7 +695,7 @@
|
||||||
@ stdcall GetSystemPreferredUILanguages(long ptr ptr ptr) kernel32.GetSystemPreferredUILanguages
|
@ stdcall GetSystemPreferredUILanguages(long ptr ptr ptr) kernel32.GetSystemPreferredUILanguages
|
||||||
# @ stub GetSystemStateRootFolder
|
# @ stub GetSystemStateRootFolder
|
||||||
@ stdcall GetSystemTime(ptr)
|
@ stdcall GetSystemTime(ptr)
|
||||||
@ stdcall GetSystemTimeAdjustment(ptr ptr ptr) kernel32.GetSystemTimeAdjustment
|
@ stdcall GetSystemTimeAdjustment(ptr ptr ptr)
|
||||||
@ stdcall GetSystemTimeAsFileTime(ptr)
|
@ stdcall GetSystemTimeAsFileTime(ptr)
|
||||||
@ stdcall GetSystemTimePreciseAsFileTime(ptr)
|
@ stdcall GetSystemTimePreciseAsFileTime(ptr)
|
||||||
@ stdcall GetSystemTimes(ptr ptr ptr)
|
@ stdcall GetSystemTimes(ptr ptr ptr)
|
||||||
|
@ -1477,7 +1477,7 @@
|
||||||
@ stdcall SetStdHandleEx(long long ptr)
|
@ stdcall SetStdHandleEx(long long ptr)
|
||||||
@ stdcall SetSystemFileCacheSize(long long long)
|
@ stdcall SetSystemFileCacheSize(long long long)
|
||||||
@ stdcall SetSystemTime(ptr)
|
@ stdcall SetSystemTime(ptr)
|
||||||
@ stdcall SetSystemTimeAdjustment(long long) kernel32.SetSystemTimeAdjustment
|
@ stdcall SetSystemTimeAdjustment(long long)
|
||||||
@ stdcall SetThreadContext(long ptr)
|
@ stdcall SetThreadContext(long ptr)
|
||||||
@ stdcall SetThreadDescription(ptr wstr)
|
@ stdcall SetThreadDescription(ptr wstr)
|
||||||
@ stdcall SetThreadErrorMode(long ptr)
|
@ stdcall SetThreadErrorMode(long ptr)
|
||||||
|
|
Loading…
Reference in New Issue