wait_for_predicted_event(_c)

	detected.i4.v = wait_for_predicted_event_c(event.i4.v [,which_one.i4.v]
						   [,delta_time.i4.v]
						   [,timeout.u4.v]
						   [,abort_func.f.v]
						   [,options.u4.v])

	This routine waits for the predicted occurrence of a TCLK event.
	It will wait until the event occurs, the timeout elapses, or
	the abort function indicates that the caller has aborted.
	until the timeout period has elapsed or the user interrupts.

	event		clock event to wait for
			(constants are in 'tclk_events')
	[which_one]	which event in the supercycle to wait for
			(0 -> wait for next occurrence (default),
			 otherwise -> wait for the nth event in the supercycle)
	[delta_time]	delta time in milliseconds relative to the
			predicted event
			(<0 -> number of milliseconds to return before the
			       event is predicted to occur,
			 0 -> return when the event is predicted to occur,
			 >0 -> number of millliseconds to return after the
			       event is predicted to occur)
			(default is 0)
	[timeout]	seconds before timeout, if <= 0 wait indefinitely
			(default is 0)
	[abort_func]	callback function to allow the caller to abort the
			wait  (If this function returns a value other than
			FALSE, the wait will be aborted.)
			(default is NULL)
	[options]	wait options (presently not used)
			(default is 0)

	This function returns status values as follows:

	OK			wait successfully completed
	CLIB_TIMEOUT		timeout reading TLG data or
				timeout period reached
	DIO_xxx			failure reading TLG data
	CLIB_NO_SUCH		event not found in TLG data
	CLIB_ABORT		user aborted wait
	negative value		ACNET format error
	TRUE			event was detected
	FALSE			event was not detected

	This function requires the following include files:

	cnsparam_h, cbslib_h, tclk_events_h, acnet_errors_h

	Related functions:

	waitev(_c), wait_for_state_c, abort_check, abort_init

	C/C++ usage:

	int	status;
	int	event = EVENT_BOOSTER_RESET_FOR_STUDIES;
	int	which_one = 0;
	unsigned int	predelta = 0;
	unsigned int	timeout = 0;
	unsigned int	options = 0;
	int_function	abort_func;

	status = wait_for_predicted_event_c(event,which_one,predelta,timeout,
					    abort_func,options);