]> 127.0.0.1 Git - bili_danmu/.git/commitdiff
添加平均每分钟观看人数提示
authorqydysky <qydysky@foxmail.com>
Sat, 7 May 2022 17:52:04 +0000 (01:52 +0800)
committerqydysky <qydysky@foxmail.com>
Sat, 7 May 2022 17:52:04 +0000 (01:52 +0800)
Reply/Reply.go

index 1f876cf08f80f92701f172e4fa9eea3ca7c81258..c3b504d764f748c75b3a49ab2014df52b8530278 100644 (file)
@@ -358,7 +358,9 @@ func (replyF) heartbeat(s int) {
                tmp = `(` + tmp + `)`
        }
        if watched_old != 0 {
-               tmp2 += `(+` + strconv.Itoa(c.C.Watched-watched_old) + `)`
+               tmp2 += `(+` + strconv.Itoa(c.C.Watched-watched_old) + " avg:"
+               tmp2 += strconv.Itoa(c.C.Watched / int(time.Since(c.C.Live_Start_Time)/time.Minute))
+               tmp2 += `人/分)`
        }
        if renqi_old != s {
                fmt.Printf("\t人气:%d %s\t观看人数:%d %s\n", s, tmp, c.C.Watched, tmp2)