From: Marcelo Toledo <marcelo@marcelotoledo.org>
Subject: format-time-string bug
Date: Mon, 12 Apr 2004 21:54:34 -0400 [thread overview]
Message-ID: <87zn9g3an9.fsf@kali.intranet> (raw)
A few days ago I was coding something related to time, then I needed to
use the function `format-time-string´ and the code above shows what I
have found wrong:
(setq t1 (current-time))
(sleep-for 3)
(setq t2 (current-time))
(format-time-string "(%H:%M:%S)" (time-subtract t2 t1))
the result of the last expression should be something near 00:00:03.
For me it is appearing 20:00:03. For other people it's appearing
diferent values but never what I am really expecting. Could someone
please try?
time-substract is returning the correct value, in this case something
near (0 3). The data format is a list of 3 integers. The first has the
most significant 16 bits of the seconds, while the second has the least
significant 16 bits. The third integer gives the microsecond count.
I didn't have time to identify witch function is bugged yet, but, if
someone more experienced could identify what is wrong, would be nice.
--
Marcelo Toledo
marcelo@marcelotoledo.org
http://www.marcelotoledo.org
Mobile: 55 71 9141-7181
next reply other threads:[~2004-04-13 1:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-13 1:54 Marcelo Toledo [this message]
2004-04-13 1:49 ` format-time-string bug Kenichi Handa
2004-04-13 2:54 ` Danilo Segan
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=87zn9g3an9.fsf@kali.intranet \
--to=marcelo@marcelotoledo.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).