Mail Archives: djgpp/1997/03/11/17:37:46
From: Caspar Derksen <caspard AT sci DOT kun DOT nl>
> I have the following problem: I want to perform some possibly expensive
> computation that I want to abort if no result is found in time. I have
> implemented this under Unix using alarm(). If some time limit is
exceeded,
> an alarm signal is raised that is handled by some procedure restoring
> the previous state of the program.
>
> With DJGPP, alarm() or signal() does not seem to work, although the
> FAQ suggests that signals and alarm should work. I am using v2 under
> Win95-DOS. Would v2.01 solve my problem? Does anyone known another
> solution?
Wouldn't it be simpler and more reliable to poll the clock throughout the
calculation. It's not like that's a hugely expensive operation
computationally.
Just a thought.
--
Igor Siemienowicz
igor AT onaustralia DOT com DOT au
- Raw text -