hotime/context_base.go

18 lines
220 B
Go
Raw Normal View History

2017-08-23 02:05:47 +00:00
package hotime
import "time"
2017-08-23 07:35:49 +00:00
type contextBase struct {
2017-08-23 02:05:47 +00:00
Error
tag int64
2017-08-23 02:05:47 +00:00
}
//唯一标志
2017-08-23 07:35:49 +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
}