1 #pragma once
2 
3 #include <common/glib.h>
4 #include <driver/timers/HPET/HPET.h>
5 #include <common/kthread.h>
6 
7 // 定义LONG_MAX为最大超时时间 - 允许负数
8 #define MAX_TIMEOUT (int64_t)((1ul << 63) - 1)
9 
10 extern void rs_timer_init();
11 extern int64_t rs_timer_get_first_expire();
12 extern uint64_t rs_timer_next_n_ms_jiffies(uint64_t expire_ms);
13 extern int64_t rs_schedule_timeout(int64_t timeout);
14 
15 extern uint64_t rs_clock();
16 extern void rs_jiffies_init();
17