# timewheel **Repository Path**: deaglebear/timewheel ## Basic Information - **Project Name**: timewheel - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-01-16 - **Last Updated**: 2026-01-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # C++ 参考实现 本目录包含原始的C++时间轮实现,作为Go版本的参考。 ## 目录结构 ``` cpp_code/ └── time_wheel/ ├── time_wheel.h ├── time_wheel_instance.h ├── singleton.h └── details/ ├── time_wheel.h ├── time_wheel_impl.h ├── time_wheel_scheduler.h ├── time_wheel_scheduler_impl.h ├── timer.h └── timer_impl.h ``` ## 说明 这是原始的C++时间轮库实现,Go版本基于此实现。 ### 核心文件 - **time_wheel.h** - 时间轮主头文件 - **time_wheel_instance.h** - 预配置实例 - **details/** - 详细实现 ### 与Go版本的对应关系 | C++ 文件 | Go 文件 | 说明 | |---------|---------|------| | `details/time_wheel.h` | `time_wheel.go` | 时间轮核心 | | `details/timer.h` | `timer.go` | 定时器 | | `details/time_wheel_scheduler.h` | `time_wheel_scheduler.go` | 调度器 | | `time_wheel_instance.h` | `time_wheel_instance.go` | 预配置实例 | ## 参考 Go版本的实现完全遵循C++版本的算法和逻辑,确保两者行为一致。 详细的对应关系和改进说明请参考: - [改进说明](../docs/IMPROVEMENTS.md) - [测试报告](../docs/TEST_REPORT.md)