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

Re: 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]


The function you which to use is SET-EVENT-TICKS.

In MCL2.0b1 this function was broken. The developpers sent me
a patch to correct it and I dont know if the patch was included
in the MCL2.0b1p3 release. If SET-EVENT-TICKS doesnt seem to
work email me and I will post the patch.

Guillaume Cartier
LACIM, Universite du Quebec a Montreal.
Bureau: (514) 987-4290
E-Mail: cartier@math.uqam.ca