help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: multithreading in Elisp?


From: Michael M Mason
Subject: Re: multithreading in Elisp?
Date: Sat, 07 Jun 2003 00:52:30 +0100

On Fri, 06 Jun 2003 14:10:10 +0200, kai.grossjohann@gmx.net (Kai
Großjohann) wrote:

>Timers are part of Emacs.  For example, the following is good for
>Brits:
>
>(defun tea-time ()
>  (message "It's time for tea!"))
>(run-at-time "5:00pm" nil 'tea-time)

Being a Brit, I couldn't help noticing the rather serious bug in the
above code snippet.  I hope you won't mind me offering an improved
version:-

(defun tea-time ()
  (message "It's time for tea!"))
(run-at-time "9:30am" nil 'tea-time)
(run-at-time "10:00am" nil 'tea-time)
(run-at-time "11:00am" nil 'tea-time)
(run-at-time "11:30am" nil 'tea-time)
(run-at-time "12:00am" nil 'tea-time)
(run-at-time "1:00pm" nil 'tea-time)
(run-at-time "2:00pm" nil 'tea-time)
(run-at-time "3:00pm" nil 'tea-time)
(run-at-time "3:30pm" nil 'tea-time)
(run-at-time "4:00pm" nil 'tea-time)
(run-at-time "5:00pm" nil 'tea-time)

-- 
Michael


reply via email to

[Prev in Thread] Current Thread [Next in Thread]