[Haskell-cafe] threadDelay delays less time than expected (Windows)
Thomas DuBuisson
thomas.dubuisson at gmail.com
Thu Dec 29 00:47:52 UTC 2016
Not to be infuriating, but I think you should check and re-check your
tooling is not using 32 bit values at any particular point.
Notice:
(fromIntegral (86400000000 `mod` 2^32)) / 10^6 ~ 500 seconds which is
your observation. Any time you depend on `Int` to represent numbers
near or greater than 2^28, or perhaps 2^31 in practice, you should
think hard about bounds and implications regarding portability anyway.
-Thomas
On Wed, Dec 28, 2016 at 4:05 PM, Lian Hung Hon <hon.lianhung at gmail.com> wrote:
> Dear Tom/Yitz,
>
> Just tested, returns False. I'm on 64 bit by the way. What should I do from
> here?
>
> Regards,
> Hon
>
>
> On 29 Dec 2016 03:47, "Yitzchak Gale" <gale at sefer.org> wrote:
>>
>> Tom wrote:
>> > (86400000000 :: Integer) > (fromIntegral (maxBound :: Int))
>> >
>> > If True, your machine (32-bit?) is probably overflowing the Int
>>
>> Good point. Even if False on Lian's Windows machine, it could
>> be there is some 32-bit value somewhere in the Windows
>> implementation that causes this.
>>
>> Yitz
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
More information about the Haskell-Cafe
mailing list