#ifndef timer_h
#define timer_h

#include "inttypes.h"

#define TIMER_OS  0
#define TIMER_MOD 1

extern uint32_t fn_time[10];

void timer_selecthardware(int type);
uint32_t timer_getrate(void);
uint32_t timer_getcs(uint32_t cs);
void timer_setrate(uint32_t new_rate);
void timer_install(void);
void timer_uninstall(void);
void timer_resetrtc(void);
uint32_t timer_gettime(void);
uint32_t timer_getrtc(void);
void timer_setrtc(uint32_t v);
void timer_pause(int on);
void timer_pausetime(int on);
void timer_pausertc(int on);

#endif
