chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] (current-seconds) returning negative values


From: Valentyn Kamyshenko
Subject: Re: [Chicken-users] (current-seconds) returning negative values
Date: Sun, 11 Jan 2004 22:58:31 -0800


On Jan 11, 2004, at 8:44 PM, felix wrote:

On Sun, 11 Jan 2004 01:48:22 -0500, Alejandro Forero Cuervo <address@hidden> wrote:


How come (current-seconds) returns a negative number?

Any suggestions on how to fix it (so, for instance,

(< (current-seconds) 0)

evaluates correctly)?

Bug of the second 2^30, uh?


Urgh. Indeed. I'll change `current-seconds' to return
a floating-point number.

does it mean that it will not have a 1-sec resolution anymore?

I would suggest to introduce a special function for time difference calculations instead, so that
  (time_diff (current-seconds) (file-modification-time "bla"))
would work properly.

Basically, I think it would be preferable to treat output of functions like current-seconds as a special type (which may be the unsigned integer, but is in fact of the time_t type in unix).

Regards,

        Valentyn.

Thanks for pointing this out.


cheers,
felix



_______________________________________________
Chicken-users mailing list
address@hidden
http://mail.nongnu.org/mailman/listinfo/chicken-users





reply via email to

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