From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Lars Brinkhoff Newsgroups: gmane.emacs.help Subject: Re: Processor time used by Emacs Date: 29 Oct 2003 15:05:54 +0100 Organization: nocrew Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <854qxsp29p.fsf@junk.nocrew.org> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1067436679 5680 80.91.224.253 (29 Oct 2003 14:11:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 29 Oct 2003 14:11:19 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 29 15:11:14 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AEr2Y-0006Ri-00 for ; Wed, 29 Oct 2003 15:11:14 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AEqyM-0006no-Rv for geh-help-gnu-emacs@m.gmane.org; Wed, 29 Oct 2003 09:06:54 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AEqxx-0006mS-K7 for help-gnu-emacs@gnu.org; Wed, 29 Oct 2003 09:06:29 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AEqxR-0006eK-8y for help-gnu-emacs@gnu.org; Wed, 29 Oct 2003 09:06:28 -0500 Original-Received: from [80.91.224.249] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AEqxQ-0006dy-Pf for help-gnu-emacs@gnu.org; Wed, 29 Oct 2003 09:05:56 -0500 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AEqxP-0004lg-00 for ; Wed, 29 Oct 2003 15:05:55 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AEqxO-0004lY-00 for ; Wed, 29 Oct 2003 15:05:54 +0100 Original-Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AEqxO-0001HE-00 for ; Wed, 29 Oct 2003 15:05:54 +0100 Original-Lines: 27 Original-X-Complaints-To: usenet@sea.gmane.org User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:13613 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:13613 David Kastrup writes: > > Is there a way in Emacs Lisp to find out the amount of processor time > > (perhaps separated into user/system time) spent by Emacs? > > > > For example, if there was such a function called processor-time, this > > should return (close to) 0: > > > > (let ((start (processor-time))) > > (sleep-for 10) > > (- (processor-time) start)) > > > > , whereas current-time would indicate that ten seconds passed > > sleeping. > > (let ((start (current-time))) > (sleep-for 10) > (float-time (time-since start))) That would return (about) 10.0, right? If so, time-since is not what I need. (My version of Emacs (20.7) doesn't have time-since, but I guess it's the time-since function from Gnus.) -- Lars Brinkhoff, Services for Unix, Linux, GCC, HTTP Brinkhoff Consulting http://www.brinkhoff.se/