From 8049ec7946ad6d5f4b4bc388b2ba4b838529a6a0 Mon Sep 17 00:00:00 2001 From: lixiangwuxian Date: Sun, 9 Mar 2025 01:12:36 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=BASteam=E6=B8=B8=E6=88=8F?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=A3=80=E6=9F=A5=E6=B7=BB=E5=8A=A0=E5=A4=9C?= =?UTF-8?q?=E9=97=B4=E6=97=B6=E6=AE=B5=E6=A3=80=E6=9F=A5=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在Steam游戏状态检查中增加了凌晨1点至早上8点的时间段过滤,避免在夜间进行不必要的检查 --- handler/steamplaying/steam_playing.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/handler/steamplaying/steam_playing.go b/handler/steamplaying/steam_playing.go index 203b56c..156058e 100644 --- a/handler/steamplaying/steam_playing.go +++ b/handler/steamplaying/steam_playing.go @@ -187,6 +187,13 @@ func RoundCheckSteamPlaying() { exitInfoMap := map[string]GameExitInfo{} util.AddCycleTask("checkSteamPlaying", 15*time.Second, 15*time.Second, func() { + // 检查当前时间是否在凌晨1点至早上8点之间 + now := time.Now() + hour := now.Hour() + if hour >= 1 && hour < 8 { + return + } + allSteamIDs, err := getAllSteamID() if err != nil { fmt.Println("获取所有steamID失败: ", err)