This commit is contained in:
aozhiwei 2023-08-11 13:12:33 +08:00
parent 607a4887d0
commit 96e7c20cf0
2 changed files with 15 additions and 0 deletions

View File

@ -14,6 +14,10 @@ func (this *ListHead) Init(data interface{}) {
this.data = data
}
func (this *ListHead) GetData() interface{} {
return this.data
}
func (this *ListHead) Del() {
this.next.prev = this.prev
this.prev.next = this.next

View File

@ -30,6 +30,17 @@ func GetTickCount() int64 {
return time.Now().UnixNano() / 1e6
}
func MkUInt16(b1 byte, b2 byte) uint16 {
return uint16(b1) + (uint16(b2) << 8)
}
func MkUInt32(b1 byte, b2 byte, b3 byte, b4 byte) uint32 {
return uint32(b1) +
(uint32(b2) << 8) +
(uint32(b3) << 16) +
(uint32(b4) << 24)
}
func MkInt64(lo32 int32, hi32 int32) int64 {
return int64(lo32) + (int64(hi32) << 32)
}