Improved coding style
This commit is contained in:
parent
eb8ff40d7b
commit
1d0521c0bb
@ -18,13 +18,10 @@ func main() {
|
|||||||
ticker := time.NewTicker(time.Second)
|
ticker := time.NewTicker(time.Second)
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
for {
|
for range ticker.C {
|
||||||
select {
|
|
||||||
case <-ticker.C:
|
|
||||||
fmt.Printf("%d packets per second, %d clients\n", server.PacketCount(), game.Clients.Count())
|
fmt.Printf("%d packets per second, %d clients\n", server.PacketCount(), game.Clients.Count())
|
||||||
server.ResetPacketCount()
|
server.ResetPacketCount()
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}()
|
}()
|
||||||
|
|
||||||
// Start listening
|
// Start listening
|
||||||
|
Loading…
Reference in New Issue
Block a user