unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Lars Brinkhoff <lars@nocrew.org>
Subject: Re: Processor time used by Emacs
Date: 29 Oct 2003 15:05:54 +0100	[thread overview]
Message-ID: <854qxsp29p.fsf@junk.nocrew.org> (raw)
In-Reply-To: x5znfkw5ec.fsf@lola.goethe.zz

David Kastrup <dak@gnu.org> 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/

  reply	other threads:[~2003-10-29 14:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.2705.1067432711.21628.help-gnu-emacs@gnu.org>
2003-10-29 13:16 ` Processor time used by Emacs David Kastrup
2003-10-29 14:05   ` Lars Brinkhoff [this message]
2003-10-29 13:02 Lars Brinkhoff
2003-10-29 15:58 ` Dan Anderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=854qxsp29p.fsf@junk.nocrew.org \
    --to=lars@nocrew.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).