Improved coding style

This commit is contained in:
Eduard Urbach 2024-01-24 23:06:45 +01:00
parent eb8ff40d7b
commit 1d0521c0bb
Signed by: akyoto
GPG Key ID: C874F672B1AF20C0

View File

@ -18,12 +18,9 @@ func main() {
ticker := time.NewTicker(time.Second) ticker := time.NewTicker(time.Second)
go func() { go func() {
for { for range ticker.C {
select { fmt.Printf("%d packets per second, %d clients\n", server.PacketCount(), game.Clients.Count())
case <-ticker.C: server.ResetPacketCount()
fmt.Printf("%d packets per second, %d clients\n", server.PacketCount(), game.Clients.Count())
server.ResetPacketCount()
}
} }
}() }()