xref: /minix/minix/kernel/clock.h (revision 7f5f010b)
1 #ifndef __CLOCK_H__
2 #define __CLOCK_H__
3 
4 #include "kernel/kernel.h"
5 #include "arch_clock.h"
6 
7 int boot_cpu_init_timer(unsigned freq);
8 int app_cpu_init_timer(unsigned freq);
9 
10 int timer_int_handler(void);
11 
12 int init_local_timer(unsigned freq);
13 /* stop the local timer ticking */
14 void stop_local_timer(void);
15 /* let the time tick again with the original settings after it was stopped */
16 void restart_local_timer(void);
17 int register_local_timer_handler(irq_handler_t handler);
18 
19 u64_t ms_2_cpu_time(unsigned ms);
20 unsigned cpu_time_2_ms(u64_t cpu_time);
21 
22 #endif /* __CLOCK_H__ */
23