Ocean/ICCC/InitCacheTimer.go
2015-06-17 17:44:52 +02:00

22 lines
337 B
Go

package ICCC
// Setup and starts the cache timer.
func initCacheTimer() {
startCacheTimerLock.Lock()
defer startCacheTimerLock.Unlock()
if cacheTimerRunning {
return
} else {
cacheTimerRunning = true
}
// Start another thread with the timer logic:
go func() {
// Endless loop:
for {
cacheTimerLogic(true)
}
}()
}