/* TIMER - Amiga CIA Timer Control Software

  originally by Paul Higginbottom, Public Domain

  hacked on by karl to produce a monotonically increasing microsecond
  clock, 12/30/88, Public Domain

  second release, 4/27/89, Public Domain

  cc +p ciatimer.c
  ln ciatimer.o -lcl32

  To start the timer, execute BeginCIATimer()

*/

struct CIA_Time
{
	long CIA_Seconds;
	long CIA_Microseconds;
};

/* timeslice is 40000 intervals.  Each interval is 1.396825 microseconds,
 * this should correspond to a timing interval of 55873 microseconds */
#define CIA_TIME_SLICE ((unsigned short) 40000)
#define CIA_TIME_QUANTITY ((unsigned short) 55873)

#define CIATIMER_INTERRUPT_NAME "CIA Periodic Timer"

