gterm/util.go

17 lines
185 B
Go

package gterm
import "sync"
var curCtr = 0
var ctrLck sync.Mutex
func ctr() int {
ctrLck.Lock()
defer ctrLck.Unlock()
if curCtr >= 99 {
curCtr = 0
}
curCtr++
return curCtr
}