how to implement timeouts for IO operations?

Johannes Waldmann joe@isun.informatik.uni-leipzig.de
Wed, 18 Apr 2001 21:36:04 +0200 (MET DST)


Thank you, Marcin. 

Your reply seems to imply that the structure
of the program I posted was basically OK?


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.)

-- 
-- Johannes Waldmann ---- http://www.informatik.uni-leipzig.de/~joe/ --
-- joe@informatik.uni-leipzig.de -- phone/fax (+49) 341 9732 204/252 --