#include "time.h" #include "conf.h" #include #include volatile unsigned int _eigentime_ms; void time_init(void) { _eigentime_ms = 0; TCCR1B = _BV(CS10); OCR1A = TIMER1_COMPA_VALUE; TIMSK |= _BV(OCIE1A); } unsigned int get_eigentime(void) { return _eigentime_ms; } ISR(TIMER1_COMPA_vect) { _eigentime_ms++; }