[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Timing with MCL2.0



I'm using MCL2.0 on a Mac II with system 6.0.4 and multifinder F1-6.0.4.
I've tried the following to measure this delay:
	(defvar *i*)
	(defun my-hook () (incf *i*) nil)
	(setf *i* 0)
	(setf ccl:*event-hook* #'my-hook)
and 10 seconds later:
	(setf ccl:*event-hook* nil)
and now the value of *i* is about 100

I've tried different combinations, but could not succeed to change the
delay between calls to event-dispatch.
Can anybody tell me what should I do to get event-dispatch called more often?
Btw, the variable *running-sleep-ticks* described page 208 does not exist.

Actually, I've written a scheduler (which can run in real-time or
out-of-real-time or step-by-step).  I have a MIDI driver (written by Boynton)
which gives me a precise clock-time (1/100 or 1/1000 th of a second).
At the moment, I use an event-hook function called periodically (and often,
if that is possible) by the MCL event system which compares the current time
with the exectime of the next ready task.  I would prefer to get a clock
interrupt when the time of the next ready task comes.
This is possible in Le_Lisp with the primitive "clockalarm".
Is there any Macintosh trap which would receive a (precise) time and a lisp
function (possibly with no arguments or possibly always the same function),
and would call (at the interrupt level) this function at this time ?

Thanks for any help or pointer.					[jack]