    ifnd    MIDI_REALTIMEBASE_I
MIDI_REALTIMEBASE_I set 1

*************************************************************************
*     RealTime Library (timing & syncing system)                        *
*************************************************************************
*                                                                       *
* Design & Development  - Talin & Joe Pearce                            *
*                                                                       *
* Copyright 1992 by Commodore Business Machines                         *
*                                                                       *
*************************************************************************
*
* realtimebase.i - RealTime library base structure
*
*************************************************************************

	ifnd	EXEC_LIBRARIES_I
	include "exec/libraries.i"
	endc

	ifnd	EXEC_LISTS_I
	include "exec/lists.i"
	endc

	ifnd	EXEC_SEMAPHORES_I
	include "exec/semaphores.i"
	endc


    STRUCTURE RealTimeBase,LIB_SIZE
	UWORD	rt_pad0

	ULONG	rt_Time	    	    ; current time
	ULONG	rt_TimeDelta   	    ; time delta
	WORD	rt_TickFreq	    ; ideal RealTime Tick frequency
	WORD	rt_TickErr	    ; nanosecond error from ideal Tick length to real tick length
				    ; actual tick length is:  1/TickFreq + TickErr/1e9
				    ; -705 < TickErr < 705

	; private stuff below here

	LABEL	RealTimeBase_PublicSize


RealTime_TickErr_Min    equ     -705
RealTime_TickErr_Max    equ     705

    endc
