mirror of
https://github.com/sorenisanerd/gotty.git
synced 2024-11-09 23:34:26 +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)
|
||
|
}
|
||
|
}
|