Assuming you mean Common Lisp, you can wrap the form in (time ...).
So, for example, to time (+ 1 2 3), you could run (time (+ 1 2 3)).
http://www.lisp.org/HyperSpec/Body/mac_time.html
Justin Dubs
I am implementing in Common Lisp. I want to monitor the time when a
particular task is being performed, as soon as the time crosses a
particular limit, the task should be ended and the next task on the agenda
should be run. Please suggest me how I can achieve this.
"ayajiv" <········@rediffmail.com> writes:
> I am implementing in Common Lisp. I want to monitor the time when a
> particular task is being performed, as soon as the time crosses a
> particular limit, the task should be ended and the next task on the agenda
> should be run. Please suggest me how I can achieve this.
This is not possible in a standard way.
What implementation are you using?
The implementations that have threads (called processes in lisp)
usually have a WITH-TIMEOUT macro.
--
__Pascal Bourguignon__ http://www.informatimago.com/
Our enemies are innovative and resourceful, and so are we. They never
stop thinking about new ways to harm our country and our people, and
neither do we. -- Georges W. Bush