chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] thread-sleep! using milliseconds->time is broken


From: Graham Fawcett
Subject: Re: [Chicken-users] thread-sleep! using milliseconds->time is broken
Date: Mon, 7 Apr 2008 16:16:35 -0400

On Mon, Apr 7, 2008 at 4:00 PM, Jim Ursetto <address@hidden> wrote:
>
> On 4/7/08, Graham Fawcett <address@hidden> wrote:
>  > On Mon, Apr 7, 2008 at 1:47 PM, Jim Ursetto <address@hidden> wrote:
>  > > So I need to do this?
>  > >
>  > >  (thread-sleep!
>  > >   (milliseconds->time (+ 500 (time->milliseconds (current-time)))))
>  >
>  > Just this:
>  > (thread-sleep! 0.5)
>
>  That would be the easy solution, yeah.  But it can not be accomplished from
>  within an egg using (declare fixnum-arithmetic) unless you call into another
>  compilation unit.  As far as I know.  And I don't want to introduce a
>  dependency on a single-function egg.

Ah, sorry, I misunderstood.

Yes, defining (thread-sleep/microseconds!) in a separate unit seems an
expedient way around the problem. (Or we could extend our SRFI-18 and
add this procedure there  -- just my two cents, but that seems like a
reasonable extension, given the commonality of compiling with
fixnum-arithmetic.)

Graham




reply via email to

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