emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] dates before 1970


From: Achim Gratz
Subject: Re: [O] dates before 1970
Date: Mon, 14 Mar 2011 19:12:50 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Nick Dokos <address@hidden> writes:
> I was referring to the C code implementing current-time (which, btw, has been
> changed in latest):
>
> ,----
> | DEFUN ("current-time", Fcurrent_time, Scurrent_time, 0, 0, 0,
> |        doc: /* Return the current time, as the number of seconds since 
> 1970-01-01 00:00:00.
> | The time is returned as a list of three 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.
> | 
> | The microsecond count is zero on systems that do not provide
> | resolution finer than a second.  */)
> |   (void)
> | {
> |   EMACS_TIME t;
> | 
> |   EMACS_GET_TIME (t);
> |   return list3 (make_number ((EMACS_SECS (t) >> 16) & 0xffff),
> |             make_number ((EMACS_SECS (t) >> 0)  & 0xffff),
> |             make_number (EMACS_USECS (t)));
> | }
> `----

I can't see how this code works correctly unless it is guaranteed that
EMACS_TIME is 32bit unsigned...
 

Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Waldorf MIDI Implementation & additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs




reply via email to

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