[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Processor time used by Emacs
From: |
David Kastrup |
Subject: |
Re: Processor time used by Emacs |
Date: |
29 Oct 2003 14:16:27 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
Lars Brinkhoff <lars@nocrew.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)))
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum