summaryrefslogtreecommitdiff
path: root/watchdog.go
blob: a57005c5a0e89091daae2bf1b46b62906176179a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package gui

import (
	"time"

	"go.wit.com/log"
)

var watchtime time.Duration = 100 // in tenths of seconds

/*
	This program sits here.
	If you exit here, the whole thing will os.Exit()
	TODO: use Ticker

	This goroutine can be used like a watchdog timer
*/
func Watchdog() {
	var i = 1
	for {
		log.Verbose("gui.Watchdog() is alive. give me something to do.", i)
		i += 1
		time.Sleep(watchtime * time.Second / 10)
	}
}