diff options
author | Adam Borowski <kilobyte@angband.pl> | 2013-10-03 13:48:04 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2013-10-03 16:53:28 +0200 |
commit | 52d390ae806240e7c68f51057e63747aedb0f157 (patch) | |
tree | c2f59393e69db8f63475cd1e76cc1ac71394b7dd /crawl-ref/source/libunix.cc | |
parent | 2dca142417c7838dd09c71aa12c63302fa0c7db3 (diff) | |
download | crawl-ref-52d390ae806240e7c68f51057e63747aedb0f157.tar.gz crawl-ref-52d390ae806240e7c68f51057e63747aedb0f157.zip |
Don't waste electricity for mapstat infinite loops.
A hard limit of 60 seconds of CPU time per level.
Diffstat (limited to 'crawl-ref/source/libunix.cc')
-rw-r--r-- | crawl-ref/source/libunix.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crawl-ref/source/libunix.cc b/crawl-ref/source/libunix.cc index adc75fb6ca..29a644af15 100644 --- a/crawl-ref/source/libunix.cc +++ b/crawl-ref/source/libunix.cc @@ -220,9 +220,11 @@ static int pending = 0; int getchk() { +#ifdef WATCHDOG // If we have (or wait for) actual keyboard input, it's not an infinite // loop. watchdog(); +#endif if (pending) { |