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