``` feat(pet): 重构宠物繁殖系统,添加蛋孵化功能

This commit is contained in:
1
2026-01-20 22:08:36 +00:00
parent cf4660fbe0
commit 5ef922278a
68 changed files with 4467 additions and 584 deletions

View File

@@ -0,0 +1,39 @@
// Copyright 2020-2024 guonaihong, antlabs. All rights reserved.
//
// mit license
package timer
type option struct {
timeWheel bool
minHeap bool
skiplist bool
rbtree bool
}
type Option func(c *option)
func WithTimeWheel() Option {
return func(o *option) {
o.timeWheel = true
}
}
func WithMinHeap() Option {
return func(o *option) {
o.minHeap = true
}
}
// TODO
func WithSkipList() Option {
return func(o *option) {
o.skiplist = true
}
}
// TODO
func WithRbtree() Option {
return func(o *option) {
o.rbtree = true
}
}