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/dbg-maps.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/dbg-maps.cc')
-rw-r--r-- | crawl-ref/source/dbg-maps.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/dbg-maps.cc b/crawl-ref/source/dbg-maps.cc index c15e072303..54bb1925ed 100644 --- a/crawl-ref/source/dbg-maps.cc +++ b/crawl-ref/source/dbg-maps.cc @@ -9,6 +9,7 @@ #include "branch.h" #include "chardump.h" +#include "crash.h" #include "dungeon.h" #include "env.h" #include "initfile.h" @@ -74,6 +75,8 @@ static bool mg_do_build_level(int niters) mg_build_attempts, mg_vetoes, mg_build_attempts? mg_vetoes * 100.0 / mg_build_attempts : 0.0); + watchdog(); + no_messages mx; for (int i = 0; i < niters; ++i) { |