Expand description
Kernel timer module.
This module provides the kernel timer functionality, which is responsible for managing the system timer and scheduling tasks based on time intervals.
Structsยง
- Kernel
Timer - Software
Timer - Software timer structure
Constantsยง
Staticsยง
- KERNEL_
TIMER ๐ - SOFTWARE_
TIMER_ ๐HEAP - TICK_
COUNT ๐ - TIMER_
ACTIVE_ ๐FLAGS - TIMER_
ID_ ๐COUNTER
Traitsยง
- Timer
Handler - Trait for timer expiration callback
Functionsยง
- add_
timer - Add a new software timer. Returns timer id.
- cancel_
timer - Cancel a timer by id (O(1) operation - just marks as inactive)
- check_
software_ ๐timers - Call this from tick() to check and fire expired timers
- get_
kernel_ timer - get_
tick - Get the current tick count (monotonic, since boot)
- get_
time_ ns - get_
time_ us - is_
timer_ ๐active - Check if a timer is active (used by check_software_timers)
- ms_
to_ ticks - Convert milliseconds to ticks
- ns_
to_ ticks - Convert nanoseconds to ticks
- tick
- Increment the global tick counter. Call this from the timer interrupt handler.
- ticks_
to_ ms - Convert ticks to milliseconds
- ticks_
to_ ns - Convert ticks to nanoseconds
- ticks_
to_ us - Convert ticks to microseconds
- us_
to_ ticks - Convert microseconds to ticks