From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.help Subject: Re: is there a emacs lisp timing command? Date: Tue, 24 Mar 2009 08:30:45 +0100 Message-ID: References: <3a58c551-a1da-4794-8eb3-7de3c504c556@n7g2000prc.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1237880480 5392 80.91.229.12 (24 Mar 2009 07:41:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 24 Mar 2009 07:41:20 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Mar 24 08:42:37 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Lm1HI-0000oz-OZ for geh-help-gnu-emacs@m.gmane.org; Tue, 24 Mar 2009 08:42:28 +0100 Original-Received: from localhost ([127.0.0.1]:33492 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lm1Fv-00051z-CW for geh-help-gnu-emacs@m.gmane.org; Tue, 24 Mar 2009 03:41:03 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news1.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.kpnqwest.it!news.kpnqwest.it.POSTED!not-for-mail Original-NNTP-Posting-Date: Tue, 24 Mar 2009 02:30:48 -0500 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) Cancel-Lock: sha1:+YHTeEeCy2Xij7lnhioD/1Fqvmk= Original-Lines: 17 X-Usenet-Provider: http://www.giganews.com Original-NNTP-Posting-Host: 212.46.180.227 Original-X-Trace: sv3-8GokcdHgknpD2RMKSVQpSeTgJr1X9CloRiIHlKJ5ALrkuodtQ7+8izD+nRED9WXtHu8kzOu5z+JfMEC!2/Z8pnqDWsQROo0vF3WFkweAmMp2BlLA65iHc6XUY7aFS4eHulhzknBbMTsP1nK2 X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.39 Original-Xref: news.stanford.edu gnu.emacs.help:167931 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:63222 Archived-At: * Xah Lee [2009-03-24 02:57+0100] writes: > anyone has written a timing command somewhere? I've use this for ages: ;;;; CL-like time macro (defmacro time (form) (autoload 'elp-elapsed-time "elp") (let ((start (make-symbol "#:start"))) `(let ((,start (current-time))) (prog1 ,form (princ (format "Elapsed time: %.2f sec \n" (elp-elapsed-time ,start (current-time)))))))) Helmut.