Experimenting with the 'timer' function it seemed to be interesting to use it as a kind of thread.
Code: Select all
#!/usr/bin/newlisp
(define (ticker)
(println (date)) (timer 'ticker 1.0))
(ticker)
(while true (println (read-key)))
Probably the signal is being sent (I trust Unix!), but obviously, newLisp is too busy with other things to capture that signal and carry out the appropriate function.The system provides each process with three interval timers, each decrementing in a distinct time domain. When any timer expires, a signal is sent to the process, and the timer (potentially) restarts.
In other words: the timer function only works when newLisp is not doing anything else? So only in interactive mode?
Peter