gotty/server/timer.go
Iwasaki Yudai a6133f34b7 Refactor
2017-08-11 15:31:11 +09:00

18 lines
282 B
Go

package server
import (
"time"
)
func (server *Server) stopTimer() {
if server.options.Timeout > 0 {
server.timer.Stop()
}
}
func (server *Server) resetTimer() {
if server.options.Timeout > 0 {
server.timer.Reset(time.Duration(server.options.Timeout) * time.Second)
}
}