all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Leo <sdl.web@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: uptime.el
Date: Wed, 19 Dec 2007 10:33:04 +0000	[thread overview]
Message-ID: <m37ijboty7.fsf@cam.ac.uk> (raw)
In-Reply-To: E1J4vuh-0005Un-UT@fencepost.gnu.org

On 2007-12-19 10:12 +0000, Richard Stallman wrote:
> What do people think of this?  (The patch in startup.el should be done
> differently.)

It is useful. For example, "10:30:10 Emacs up 9 day(s), 23:59". I have
put something like the following in .emacs for almost a year.

(defvar emacs-up-time (current-time)
  "Time at which Emacs started up.")
(defun uptime ()
  "Displays Emacs uptime."
  (interactive)
  (let* ((now (current-time))
         (second (floor (- (time-to-seconds now)
                           (time-to-seconds emacs-up-time))))
         (minute (floor second 60))
         (hour (floor minute 60))
         (day (floor hour 24)))
    (message "%s Emacs up %s day(s), %02d:%02d"
             (format-time-string "%T" now) day (% hour 24) (% minute 60))))

-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .:  [ GPG Key: 9283AA3F ]  :.

          Use the best OS -- http://www.fedoraproject.org/

  reply	other threads:[~2007-12-19 10:33 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-19 10:12 uptime.el Richard Stallman
2007-12-19 10:33 ` Leo [this message]
2007-12-23  2:26 ` uptime.el Ævar Arnfjörð Bjarmason
2007-12-23 21:11   ` uptime.el Richard Stallman
2007-12-23 17:48 ` uptime.el Juri Linkov
2007-12-24 13:31   ` uptime.el Richard Stallman
2007-12-24 21:59     ` uptime.el Juri Linkov
2007-12-25 21:13       ` uptime.el Richard Stallman
2008-02-11  0:34 ` uptime.el Glenn Morris
2008-02-12  0:14   ` uptime.el Juri Linkov
2008-02-12  5:50     ` uptime.el Glenn Morris
  -- strict thread matches above, loose matches on Subject: below --
2008-02-11 23:03 uptime.el Francesc Rocher
2008-02-12  5:54 ` uptime.el Glenn Morris
2008-02-12 23:35   ` uptime.el Juri Linkov
2008-02-14  9:04     ` uptime.el Glenn Morris
2008-02-14 20:56       ` uptime.el Juri Linkov
2008-02-15  8:02         ` uptime.el Glenn Morris
2008-02-16  0:27           ` uptime.el Juri Linkov
2008-02-16  3:35             ` uptime.el Glenn Morris
2008-02-16 19:14               ` uptime.el Juri Linkov
2008-02-16 22:22                 ` uptime.el Glenn Morris
2008-02-16 23:18                   ` uptime.el Juri Linkov
2008-02-17  0:19                     ` uptime.el Glenn Morris
2008-02-17  0:45                       ` uptime.el Juri Linkov
2008-02-17 22:55                         ` uptime.el Glenn Morris
2008-02-17 23:11                           ` uptime.el Juri Linkov
2008-02-16  2:00           ` uptime.el Xavier Maillard

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

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

  git send-email \
    --in-reply-to=m37ijboty7.fsf@cam.ac.uk \
    --to=sdl.web@gmail.com \
    --cc=emacs-devel@gnu.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.