// Andrew Chanler // timer_lib.ic // Timer Library // pretty simple and useful // keep track of which timers are being used here /* 0 - used by stop to tell if it hasnt been moving for certain amoutn of time 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 */ #define NUM_TIMERS 16 long lib_timers[NUM_TIMERS] = { 0L }; void Reset_Timer(int n) { lib_timers[n] = mseconds(); } long Get_Timer(int n) { return ( mseconds() - lib_timers[n] ); }