Skip to content

Commit 842da42

Browse files
committed
更新
Signed-off-by: guonaihong <guonaihong@qq.com>
1 parent cdf2966 commit 842da42

13 files changed

+158
-10
lines changed

min_heap.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright 2020-2024 guonaihong, antlabs. All rights reserved.
2+
//
3+
// mit license
14
package timer
25

36
import (

min_heap_node.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright 2020-2024 guonaihong, antlabs. All rights reserved.
2+
//
3+
// mit license
14
package timer
25

36
import (

min_heap_node_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Copyright 2020-2024 guonaihong, antlabs. All rights reserved.
2+
//
3+
// mit license
4+
15
package timer
26

37
import (

min_heap_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright 2020-2024 guonaihong, antlabs. All rights reserved.
2+
//
3+
// mit license
14
package timer
25

36
import (

option.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright 2020-2024 guonaihong, antlabs. All rights reserved.
2+
//
3+
// mit license
14
package timer
25

36
type option struct {
@@ -21,14 +24,14 @@ func WithMinHeap() Option {
2124
}
2225
}
2326

24-
//TODO
27+
// TODO
2528
func WithSkipList() Option {
2629
return func(o *option) {
2730
o.skiplist = true
2831
}
2932
}
3033

31-
//TODO
34+
// TODO
3235
func WithRbtree() Option {
3336
return func(o *option) {
3437
o.rbtree = true

t_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright 2020-2024 guonaihong, antlabs. All rights reserved.
2+
//
3+
// mit license
14
package timer
25

36
import (

time_wheel.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright 2020-2024 guonaihong, antlabs. All rights reserved.
2+
//
3+
// mit license
14
package timer
25

36
import (

time_wheel_node.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright 2020-2024 guonaihong, antlabs. All rights reserved.
2+
//
3+
// mit license
14
package timer
25

36
import (
@@ -105,5 +108,5 @@ func (t *timeNode) Reset(expire time.Duration) {
105108
expire = expire/(time.Millisecond*10) + time.Duration(jiffies)
106109
t.expire = uint64(expire)
107110

108-
t.root.add(t, atomic.LoadUint64(&t.root.jiffies))
111+
t.root.add(t, jiffies)
109112
}

time_wheel_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright 2020-2024 guonaihong, antlabs. All rights reserved.
2+
//
3+
// mit license
14
package timer
25

36
import (

time_wheel_utils.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright 2020-2024 guonaihong, antlabs. All rights reserved.
2+
//
3+
// mit license
14
package timer
25

36
import "time"

0 commit comments

Comments
 (0)