]> 127.0.0.1 Git - bili_danmu/.git/commitdiff
Improve 精准的保持牌子
authorqydysky <qydysky@foxmail.com>
Thu, 1 Aug 2024 02:42:40 +0000 (10:42 +0800)
committerGitHub <noreply@github.com>
Thu, 1 Aug 2024 02:42:40 +0000 (10:42 +0800)
Reply/F.go

index 9be9e335c2eaca155bf0743b4266dce84e6b0e4b..a9dc6d0400c5ecf0c5912348b6047c059564c7ab 100644 (file)
@@ -1014,10 +1014,9 @@ func KeepMedalLight(ctx context.Context, common *c.Common) {
                        ctx, done := pctx.WaitCtx(ctx)
                        defer done()
 
-                       h, m, s := time.Now().Clock()
-                       now := h*3600 + m*60 + s
-
                        for {
+                               h, m, s := time.Now().Clock()
+                               now := h*3600 + m*60 + s
                                if sec >= now {
                                        select {
                                        case <-time.After(time.Second * time.Duration(sec-now)):