From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Michael M Mason Newsgroups: gmane.emacs.help Subject: Re: multithreading in Elisp? Date: Sat, 07 Jun 2003 00:52:30 +0100 Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <02a2ev8k6p7k0cr6n66rlt7bpmr8lvt6mv@4ax.com> References: <844r38vqlk.fsf@lucy.is.informatik.uni-duisburg.de> <848ysfz9st.fsf@lucy.is.informatik.uni-duisburg.de> Reply-To: mmmason@ntlworld.com NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1054944158 3750 80.91.224.249 (7 Jun 2003 00:02:38 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 7 Jun 2003 00:02:38 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Sat Jun 07 02:02:36 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19OR9u-0000x5-00 for ; Sat, 07 Jun 2003 02:02:10 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19OR9l-00065P-6Z for gnu-help-gnu-emacs@m.gmane.org; Fri, 06 Jun 2003 20:02:01 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!nntp.cs.ubc.ca!skynet.be!skynet.be!fu-berlin.de!uni-berlin.de!pc3-papw1-6-cust127.cmbg.cable.ntl.COM!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 30 Original-NNTP-Posting-Host: pc3-papw1-6-cust127.cmbg.cable.ntl.com (80.6.124.127) Original-X-Trace: fu-berlin.de 1054943547 12738739 80.6.124.127 (16 [175534]) X-Newsreader: Forte Agent 1.9/32.560 Original-Xref: shelby.stanford.edu gnu.emacs.help:114248 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:10742 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:10742 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