hotime/common/context_base.go

18 lines
220 B
Go
Raw Normal View History

2021-05-23 23:27:41 +00:00
package common
2017-08-23 02:05:47 +00:00
import "time"
2021-05-23 23:27:41 +00:00
type ContextBase struct {
2017-08-23 02:05:47 +00:00
Error
tag int64
2017-08-23 02:05:47 +00:00
}
//唯一标志
2021-05-23 23:27:41 +00:00
func (this *ContextBase) GetTag() int64 {
2017-08-23 02:05:47 +00:00
if this.tag == int64(0) {
this.tag = time.Now().UnixNano()
}
return this.tag
}