Skip to content

Commit

Permalink
优化代码
Browse files Browse the repository at this point in the history
  • Loading branch information
ygxbnet committed Jan 29, 2024
1 parent c68bb6f commit 0b439ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func timeEvent() {
log.Error(err)
}

for true {
for {
timing(0, 0, 0)
err := logFile.Close()
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion service/group/time_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func Init() {
// 每 12h 定时向 Test 群发送消息
go func() {
count := 0
for true {
for {
time.Sleep(time.Hour * 12)
count = count + 1
cqapi.SendGroupMsg(config.Get().Group.InfoID, "每 12h 定时发送消息\n程序发送次数:"+strconv.Itoa(count))
Expand Down

0 comments on commit 0b439ea

Please sign in to comment.