unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* format-time-string bug
@ 2004-04-13  1:54 Marcelo Toledo
  2004-04-13  1:49 ` Kenichi Handa
  2004-04-13  2:54 ` Danilo Segan
  0 siblings, 2 replies; 3+ messages in thread
From: Marcelo Toledo @ 2004-04-13  1:54 UTC (permalink / 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-04-13  2:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-13  1:54 format-time-string bug Marcelo Toledo
2004-04-13  1:49 ` Kenichi Handa
2004-04-13  2:54 ` Danilo Segan

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).