[Top][All Lists]

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

Re: uptime.el

From: Juri Linkov
Subject: Re: uptime.el
Date: Tue, 12 Feb 2008 02:14:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

>> What do people think of this?
> Might as well have this functionality. I installed something similar.


>> (The patch in startup.el should be done differently.)
> I set emacs-startup-time in command-line.

I think there should be two recorded startup timestamps instead of one:
the first timestamp recorded as early as possible, and the second - when
Emacs completely finishes loading .emacs and all related files.

The difference between these two timestamps will show how much time the
startup process itself takes.  This is useful for optimization of
.emacs loading.

So a new command emacs-startup-time could display (or non-interactively
return) the duration of the Emacs startup.

>> (defun emacs-uptime (&optional here) "\
>> Tell how long GNU Emacs has been running.
>> If the optional argument HERE is non-nil, insert string at point."
> Didn't see the point of the HERE argument; used an alternative
> implementation based on something in gnus-art.

A general time difference function would be definitely useful,
but what format it should use?  For the uptime perhaps the standard
format of the `uptime' system command is more preferable, e.g.
"15:16:19 up 51 days 1 year".

Juri Linkov

reply via email to

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