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

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

Re: Processor time used by Emacs


From: Lars Brinkhoff
Subject: Re: Processor time used by Emacs
Date: 29 Oct 2003 15:05:54 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

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 via email to

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