1
This commit is contained in:
parent
607a4887d0
commit
96e7c20cf0
@ -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
|
||||
|
11
sysutils.go
11
sysutils.go
@ -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)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user