[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
format-time-string bug
From: |
Marcelo Toledo |
Subject: |
format-time-string bug |
Date: |
Mon, 12 Apr 2004 21:54:34 -0400 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux) |
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
address@hidden
http://www.marcelotoledo.org
Mobile: 55 71 9141-7181
- format-time-string bug,
Marcelo Toledo <=