mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 06:00:46 +00:00
Remove support for SystemEvents.TimeChanged
This causes excessive delay during ASF shutdown on Windows, and because it's completely optional for irrelevant feature, it's not worth the burden
This commit is contained in:
@@ -25,7 +25,6 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' != 'net48' AND ('$(TargetGeneric)' == 'true' OR '$(TargetWindows)' == 'true')">
|
||||
<PackageReference Include="Microsoft.Win32.SystemEvents" />
|
||||
<PackageReference Include="System.IO.FileSystem.AccessControl" />
|
||||
<PackageReference Include="System.Security.Cryptography.ProtectedData" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -73,13 +73,5 @@ namespace ArchiSteamFarm.Core {
|
||||
Timer.Change(dueTime, Timeout.Infinite);
|
||||
}
|
||||
}
|
||||
|
||||
#if TARGET_GENERIC || TARGET_WINDOWS
|
||||
internal static void OnTimeChanged(object? sender, EventArgs e) {
|
||||
lock (LockObject) {
|
||||
Timer.Change(TimeSpan.Zero, Timeout.InfiniteTimeSpan);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,12 +19,6 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#if NETFRAMEWORK
|
||||
using OperatingSystem = JustArchiNET.Madness.OperatingSystemMadness.OperatingSystem;
|
||||
#endif
|
||||
#if TARGET_GENERIC || TARGET_WINDOWS
|
||||
using Microsoft.Win32;
|
||||
#endif
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
@@ -275,12 +269,6 @@ namespace ArchiSteamFarm {
|
||||
} else {
|
||||
// April Fools easter egg logic
|
||||
AprilFools.Init();
|
||||
|
||||
#if TARGET_GENERIC || TARGET_WINDOWS
|
||||
if (OperatingSystem.IsWindows()) {
|
||||
SystemEvents.TimeChanged += AprilFools.OnTimeChanged;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(latestJson)) {
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' != 'net48' AND ('$(TargetGeneric)' == 'true' OR '$(TargetWindows)' == 'true')">
|
||||
<PackageVersion Include="Microsoft.Win32.SystemEvents" Version="5.0.0" />
|
||||
<PackageVersion Include="System.IO.FileSystem.AccessControl" Version="5.0.0" />
|
||||
<PackageVersion Include="System.Security.Cryptography.ProtectedData" Version="5.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user