Move OnTimeChanged event from ASF to OS

This commit is contained in:
JustArchi
2017-02-13 21:16:12 +01:00
parent 56983c0470
commit cbcc045369
2 changed files with 5 additions and 5 deletions

View File

@@ -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);