mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-16 08:25:28 +00:00
Move OnTimeChanged event from ASF to OS
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using ArchiSteamFarm.Localization;
|
||||
using Microsoft.Win32;
|
||||
|
||||
namespace ArchiSteamFarm {
|
||||
internal static class OS {
|
||||
@@ -39,6 +40,8 @@ namespace ArchiSteamFarm {
|
||||
KeepWindowsSystemActive();
|
||||
break;
|
||||
}
|
||||
|
||||
SystemEvents.TimeChanged += OnTimeChanged;
|
||||
}
|
||||
|
||||
private static void KeepWindowsSystemActive() {
|
||||
@@ -53,6 +56,8 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
}
|
||||
|
||||
private static async void OnTimeChanged(object sender, EventArgs e) => await MobileAuthenticator.OnTimeChanged().ConfigureAwait(false);
|
||||
|
||||
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
|
||||
private static extern EExecutionState SetThreadExecutionState(EExecutionState executionState);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user