1
This commit is contained in:
parent
e0ae331d17
commit
6fd253d455
22
timer.go
22
timer.go
@ -119,6 +119,13 @@ func (this *Timer) Update() {
|
||||
this.runningTimer = nil
|
||||
}
|
||||
|
||||
func (this *Timer) NewTimerAttacher() *TimerAttacher {
|
||||
attacher := new(TimerAttacher)
|
||||
attacher.timer = this
|
||||
attacher.timers.Init()
|
||||
return attacher
|
||||
}
|
||||
|
||||
func (this *Timer) AddDeadLineTimer(
|
||||
milli_seconds int32,
|
||||
init_func func (params* XParams),
|
||||
@ -226,10 +233,6 @@ func (this *Timer) DeleteTimer(timerList *TimerList) {
|
||||
this.addToFreeList(timerList)
|
||||
}
|
||||
|
||||
func (this *Timer) GetTimerByAtttach(attachEntry *ListHead) *TimerList {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (this *Timer) GetRemainTime(timerList *TimerList) int64 {
|
||||
if timerList == nil {
|
||||
return 0
|
||||
@ -246,8 +249,15 @@ func (this *Timer) GetRunningTimer() *TimerList {
|
||||
return this.runningTimer
|
||||
}
|
||||
|
||||
func (this *Timer) GetIdleMilliSeconds() int64 {
|
||||
return 0
|
||||
func (this *Timer) GetIdleTime() int64 {
|
||||
var idleTime int64 = 1
|
||||
for i := (this.timerTick & TVR_MASK); i < TVR_SIZE; i++ {
|
||||
if !this.tv1[i].Empty() {
|
||||
break
|
||||
}
|
||||
idleTime++
|
||||
}
|
||||
return idleTime
|
||||
}
|
||||
|
||||
func (this *Timer) detachTimer(timerList *TimerList) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user