1
0
Fork 0

Make use of StateSaveInterval constant

This commit is contained in:
Gregory Eremin 2014-07-12 18:16:00 +07:00
parent bd561cd73a
commit 59b52bfb8c
1 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ type (
const (
StateMetaKey = "state"
StateSaveInterval = 10
StateSaveInterval = 1 // seconds
)
func SaveState() {
@ -55,7 +55,7 @@ func LoadState() {
}
func KeepStatePersisted() {
t := time.NewTicker(time.Second)
t := time.NewTicker(StateSaveInterval * time.Second)
for {
<-t.C
SaveState()