how to implement timeouts for IO operations?

Michael Weber michael.weber@post.rwth-aachen.de
Wed, 18 Apr 2001 22:08:42 +0200


On Wed, Apr 18, 2001 at 21:36:04 +0200, Johannes Waldmann wrote:
> A slightly related point, I was having difficulties with TimeDiff 
> values - I got negative tdPicosecs sometimes,
> and some functions (show) even dumped core.
> 
> Are such problems known (I am using a binary ghc-4.08)?
> For the moment, I switched to Posix.EpochTime.
> 
> 
> I found TimeDiff and ClockTime quite restrictive:
> they are not instances of Num, I can't add/subtract/negate TimeDiffs;
> and I cannot generate a zero ClockTime.
> (In my application, I need to simulate two clocks,
> where always one is running, the other one is stopped -
> as used in tournament Chess.)

Despite my humble try, TimeDiff and ClockTime (Time.lhs) are still
b0rked.  Use on your own risk (and read the comments at the top).
Sorry for that...


Cheers,
Michael