mirror of
https://github.com/sorenisanerd/gotty.git
synced 2024-11-13 00:44:25 +00:00
18 lines
282 B
Go
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)
|
|
}
|
|
}
|