Difference between gcron
and gtimer
Differences between Cron Job and Timer:
gtimer
is a high-performance module, a core framework module, serving as the foundation for building any scheduled task, with method operation times measured innanoseconds
.gtimer
is applicable in any scheduled task scenario, such as TCP communication, game development, etc.gcron
supports the classiccrontab
syntax for scheduled tasks, with a minimum time setting interval ofseconds
.gcron
is 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 |