mirror of
https://github.com/JustArchiNET/ArchiSteamFarm
synced 2024-11-10 07:04:27 +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:
parent
ca03d68eb5
commit
4935ec3187
4 changed files with 0 additions and 22 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue