GoTimeWheel
Timer Implemented By Go,Also Called TimeWheel
Install / Use
/learn @zheng-ji/GoTimeWheelREADME
goTimeWheel
TimeWheel Implemented By Go. Go 实现的时间轮,俗称定时器 Link

Feature
- Effective at Space Usage
- Each Timer Can Custom Its Task
Installation
go get github.com/zheng-ji/goTimeWheel
Example
import (
"fmt"
"github.com/zheng-ji/goTimeWheel"
)
func main() {
// timer ticker
tw := goTimeWheel.New(1*time.Second, 3600)
tw.Start()
// "ID1" means the timer's name
// Specify a function and params, it will run after 3s later
name := "ID1"
params := map[string]int{"age": 1}
fn := func(data interface{}) {
fmt.Printf("hello, %v\n", data)
}
tw.AddTimer(3*time.Second, name, fn, params)
// Your Logic Code
select{}
}
License
Copyright (c) 2019 by zheng-ji released under MIT License.
Related Skills
node-connect
351.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
