[Haskell-cafe] Thread scheduling

Luke Palmer lrpalmer at gmail.com
Fri Jun 11 01:34:28 EDT 2010

Say, using System.Time.getClockTime.


On Thu, Jun 10, 2010 at 11:31 PM, Luke Palmer <lrpalmer at gmail.com> wrote:
> On Thu, Jun 10, 2010 at 11:50 AM, Andrew Coppin
> <andrewcoppin at btinternet.com> wrote:
>> Control.Concurrent provides the threadDelay function, which allows you to
>> make the current thread sleep until T=now+X. However, I can't find any way
>> of making the current thread sleep until T=X. In other words, I want to
>> specify an absolute wakeup time, not a relative one.
> Modulo a small epsilon between the two actions, can't you just get the
> current time and subtract it from the target time?  threadDelay is
> allowed to delay for too long anyway, so doing it this way does not
> lose you any correctness.
> Luke

More information about the Haskell-Cafe mailing list