Topic: tech dcc pc src prev next

tech dcc pc src > millis.h

#ifndef HERMES_MILLIS_H
#define HERMES_MILLIS_H

typedef long unsigned int millis_type;

/*
 * Initialise interrupts and timers used by the millis() function.
 *
 * The millis() function needs TIMER0 to operate.
 */
void init_millis();

/*
 * Get the number of milliseconds that have passed since the program started.
 *
 * The number of milliseconds is stored using a static counter updated by a
 * timer overflow interrupt.
 */
millis_type millis();

#endif