aboutsummaryrefslogtreecommitdiff
path: root/internal/generation_num/generation_num.go
blob: 298db14465e2445d81c6fceb8b63414407d1d773 (plain)
1
2
3
4
5
6
7
8
9
10
11
package generation_num

import (
	"sync/atomic"
)

var gen uint64

func Next() uint64 {
	return atomic.AddUint64(&gen, 1)
}