// OSGOS shop client // ======================================================================================================= // Author: LLC Texnico // All rights reserved // Russia, Chelyabinsk, 2022-2024 package services import ( "runtime/debug" "shop-client/common" "time" ) var ( stop chan bool ) func HelperService() { stop = make(chan bool, 1) for { select { case <-stop: return case <-time.After(time.Minute): handleCommon() } } } func handleCommon() { common.SaveOptions() debug.FreeOSMemory() } func Stop() { stop <- true handleCommon() }