func NewAtomicInt64(n int64) AtomicInt64 {
	return AtomicInt64{n}
}
NewAtomicInt64 initializes a new AtomicInt64 with a given value.
package sync2
import (
	"sync"
	"sync/atomic"
	"time"
)
type AtomicInt32 struct {
	int32
}
func NewAtomicInt32(n int32) AtomicInt32 {
	return AtomicInt32{n}
}
func (i *AtomicInt32) Add(n int32) int32 {
	return atomic.AddInt32(&i.int32, n)
}
func (i *AtomicInt32) Set(n int32) {
	atomic.StoreInt32(&i.int32, n)
}
func (i *AtomicInt32) Get() int32 {
	return atomic.LoadInt32(&i.int32)
}
func (i *AtomicInt32) CompareAndSwap(oldval, newval int32) (swapped bool) {
	return atomic.CompareAndSwapInt32(&i.int32, oldval, newval)
}
type AtomicInt64 struct {
	int64
}