GetSystemTimeAdjustment function kernel32

Win32Result<bool> GetSystemTimeAdjustment(
  1. Pointer<Uint32> lpTimeAdjustment,
  2. Pointer<Uint32> lpTimeIncrement,
  3. Pointer<Int32> lpTimeAdjustmentDisabled
)

Determines whether the system is applying periodic time adjustments to its time-of-day clock, and obtains the value and period of any such adjustments.

To learn more, see learn.microsoft.com/windows/win32/api/sysinfoapi/nf-sysinfoapi-getsystemtimeadjustment.

Implementation

Win32Result<bool> GetSystemTimeAdjustment(
  Pointer<Uint32> lpTimeAdjustment,
  Pointer<Uint32> lpTimeIncrement,
  Pointer<Int32> lpTimeAdjustmentDisabled,
) {
  resolveGetLastError();
  final result_ = _GetSystemTimeAdjustment(
    lpTimeAdjustment,
    lpTimeIncrement,
    lpTimeAdjustmentDisabled,
  );
  return .new(value: result_ != FALSE, error: GetLastError());
}