Difference between gcron and gtimer
Differences between Cron Job and Timer:
gtimeris a high-performance module, a core framework module, serving as the foundation for building any scheduled task, with method operation times measured innanoseconds.gtimeris applicable in any scheduled task scenario, such as TCP communication, game development, etc.gcronsupports the classiccrontabsyntax for scheduled tasks, with a minimum time setting interval ofseconds.gcronis implemented based ongtimer.
| Similar Module | Description | Performance | Linux-like Crontab Pattern | Underlying Implementation |
|---|---|---|---|---|
| Cron Job | Scheduled task. Higher-level encapsulation, time scale in natural seconds. | General | Supported | Based on gtimer |
| Timer | Timer. Low-level component, time scale in terms of time slots (customizable). | Efficient | Not supported | Custom implementation based on PriorityQueue data structure |