feat: 为Steam游戏状态检查添加夜间时段检查功能

在Steam游戏状态检查中增加了凌晨1点至早上8点的时间段过滤,避免在夜间进行不必要的检查
This commit is contained in:
lixiangwuxian 2025-03-09 01:12:36 +08:00
parent 78b0b63f90
commit 8049ec7946

View File

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