mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 06:00:46 +00:00
Misc optimization
This commit is contained in:
@@ -254,12 +254,20 @@ namespace ArchiSteamFarm {
|
||||
internal void Init(Bot bot) => Bot = bot ?? throw new ArgumentNullException(nameof(bot));
|
||||
|
||||
internal static async Task ResetSteamTimeDifference() {
|
||||
if ((SteamTimeDifference == null) && (LastSteamTimeCheck == DateTime.MinValue)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!await TimeSemaphore.WaitAsync(0).ConfigureAwait(false)) {
|
||||
// Resolve or reset is already in-progress
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
if ((SteamTimeDifference == null) && (LastSteamTimeCheck == DateTime.MinValue)) {
|
||||
return;
|
||||
}
|
||||
|
||||
SteamTimeDifference = null;
|
||||
LastSteamTimeCheck = DateTime.MinValue;
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user